Fix rendering & and " in preview panel

* Set plain text mode on elements that should never have styling
* Revert html escaping as a prior fix
This commit is contained in:
Jonathan White committed 2025-01-06 06:23:31 -05:00
1 parent 620abb96f2
commit 17dc022e15
2 files changed
+14 -3

No files matched your search

+4 -2
View File
@@ -245,7 +245,7 @@ void EntryPreviewWidget::updateEntryHeaderLine()
{
Q_ASSERT(m_currentEntry);
const QString title = m_currentEntry->resolveMultiplePlaceholders(m_currentEntry->title());
m_ui->entryTitleLabel->setRawText(hierarchy(m_currentEntry->group(), title.toHtmlEscaped()));
m_ui->entryTitleLabel->setRawText(hierarchy(m_currentEntry->group(), title));
m_ui->entryIcon->setPixmap(Icons::entryIconPixmap(m_currentEntry, IconSize::Large));
}
@@ -302,10 +302,12 @@ void EntryPreviewWidget::setPasswordVisible(bool state)
html += "<span style=\"color: " + QString(color) + ";\">" + QString(c).toHtmlEscaped() + "</span>";
}
// clang-format on
m_ui->entryPasswordLabel->setTextFormat(Qt::RichText);
m_ui->entryPasswordLabel->setText(html);
} else {
// No color
m_ui->entryPasswordLabel->setText(password.toHtmlEscaped());
m_ui->entryPasswordLabel->setTextFormat(Qt::PlainText);
m_ui->entryPasswordLabel->setText(password);
}
} else if (password.isEmpty() && !config()->get(Config::Security_PasswordEmptyPlaceholder).toBool()) {
m_ui->entryPasswordLabel->setText("");