diff --git a/src/gui/EntryPreviewWidget.cpp b/src/gui/EntryPreviewWidget.cpp index 38afbcf24..45a71a348 100644 --- a/src/gui/EntryPreviewWidget.cpp +++ b/src/gui/EntryPreviewWidget.cpp @@ -286,14 +286,18 @@ void EntryPreviewWidget::updateEntryAdvancedTab() setTabEnabled(m_ui->entryTabWidget, m_ui->entryAdvancedTab, hasAttributes || hasAttachments); if (hasAttributes) { - QString attributesText; + QString attributesText(""); for (const QString& key : customAttributes) { - QString value = m_currentEntry->attributes()->value(key); + QString value; if (m_currentEntry->attributes()->isProtected(key)) { value = "" + tr("[PROTECTED]") + ""; + } else { + value = m_currentEntry->attributes()->value(key).toHtmlEscaped(); + value.replace('\n', QLatin1String("
")); } - attributesText.append(tr("%1: %2", "attributes line").arg(key, value).append("
")); + attributesText.append(tr("", "attributes line").arg(key, value)); } + attributesText.append("
%1:%2
"); m_ui->entryAttributesEdit->setText(attributesText); }