From 422fd9125534fc26adf85d6bd31dd868a19f910d Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Mon, 24 Oct 2022 07:23:11 -0400 Subject: Fix display of passwords in preview panel * Fix #8627 - don't HTML escape plain text... * Fix #8624 - ensure use of monospace font when displaying passwords in preview panel --- src/gui/EntryPreviewWidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/EntryPreviewWidget.cpp b/src/gui/EntryPreviewWidget.cpp index 5050aedec..11de4a60f 100644 --- a/src/gui/EntryPreviewWidget.cpp +++ b/src/gui/EntryPreviewWidget.cpp @@ -250,6 +250,8 @@ void EntryPreviewWidget::setUsernameVisible(bool state) void EntryPreviewWidget::setPasswordVisible(bool state) { + m_ui->entryPasswordLabel->setFont(Font::fixedFont()); + const QString password = m_currentEntry->resolveMultiplePlaceholders(m_currentEntry->password()); if (state) { if (config()->get(Config::GUI_ColorPasswords).toBool()) { @@ -268,7 +270,7 @@ void EntryPreviewWidget::setPasswordVisible(bool state) m_ui->entryPasswordLabel->setHtml(html); } else { // No color - m_ui->entryPasswordLabel->setPlainText(password.toHtmlEscaped()); + m_ui->entryPasswordLabel->setPlainText(password); } } else if (password.isEmpty() && !config()->get(Config::Security_PasswordEmptyPlaceholder).toBool()) { m_ui->entryPasswordLabel->setPlainText(""); @@ -276,7 +278,6 @@ void EntryPreviewWidget::setPasswordVisible(bool state) m_ui->entryPasswordLabel->setPlainText(QString("\u25cf").repeated(6)); } - m_ui->entryPasswordLabel->setFont(Font::fixedFont()); m_ui->togglePasswordButton->setIcon(icons()->onOffIcon("password-show", state)); } -- cgit v1.2.3