diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp index af6907001..fed4535bb 100644 --- a/src/gui/DatabaseTabWidget.cpp +++ b/src/gui/DatabaseTabWidget.cpp @@ -246,7 +246,7 @@ bool DatabaseTabWidget::closeDatabase(Database* db) QMessageBox::StandardButton result = MessageBox::question( this, tr("Close?"), - tr("\"%1\" is in edit mode.\nDiscard changes and close anyway?").arg(dbName), + tr("\"%1\" is in edit mode.\nDiscard changes and close anyway?").arg(dbName.toHtmlEscaped()), QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Cancel); if (result == QMessageBox::Cancel) { return false; @@ -262,7 +262,7 @@ bool DatabaseTabWidget::closeDatabase(Database* db) QMessageBox::StandardButton result = MessageBox::question( this, tr("Save changes?"), - tr("\"%1\" was modified.\nSave changes?").arg(dbName), + tr("\"%1\" was modified.\nSave changes?").arg(dbName.toHtmlEscaped()), QMessageBox::Yes | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Yes); if (result == QMessageBox::Yes) { if (!saveDatabase(db)) { diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index 985374c49..00bf1168a 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -341,7 +341,7 @@ void DatabaseWidget::deleteEntries() result = MessageBox::question( this, tr("Delete entry?"), tr("Do you really want to delete the entry \"%1\" for good?") - .arg(selectedEntries.first()->title()), + .arg(selectedEntries.first()->title().toHtmlEscaped()), QMessageBox::Yes | QMessageBox::No); } else { @@ -365,7 +365,7 @@ void DatabaseWidget::deleteEntries() result = MessageBox::question( this, tr("Move entry to recycle bin?"), tr("Do you really want to move entry \"%1\" to the recycle bin?") - .arg(selectedEntries.first()->title()), + .arg(selectedEntries.first()->title().toHtmlEscaped()), QMessageBox::Yes | QMessageBox::No); } else { @@ -532,7 +532,7 @@ void DatabaseWidget::deleteGroup() QMessageBox::StandardButton result = MessageBox::question( this, tr("Delete group?"), tr("Do you really want to delete the group \"%1\" for good?") - .arg(currentGroup->name()), + .arg(currentGroup->name().toHtmlEscaped()), QMessageBox::Yes | QMessageBox::No); if (result == QMessageBox::Yes) { delete currentGroup; diff --git a/src/gui/entry/EditEntryWidget.cpp b/src/gui/entry/EditEntryWidget.cpp index d9ba5bd83..f9b104912 100644 --- a/src/gui/entry/EditEntryWidget.cpp +++ b/src/gui/entry/EditEntryWidget.cpp @@ -271,14 +271,15 @@ void EditEntryWidget::loadEntry(Entry* entry, bool create, bool history, const Q m_history = history; if (history) { - setHeadline(QString("%1 > %2").arg(parentName, tr("Entry history"))); + setHeadline(QString("%1 > %2").arg(parentName.toHtmlEscaped(), tr("Entry history"))); } else { if (create) { - setHeadline(QString("%1 > %2").arg(parentName, tr("Add entry"))); + setHeadline(QString("%1 > %2").arg(parentName.toHtmlEscaped(), tr("Add entry"))); } else { - setHeadline(QString("%1 > %2 > %3").arg(parentName, entry->title(), tr("Edit entry"))); + setHeadline(QString("%1 > %2 > %3").arg(parentName.toHtmlEscaped(), + entry->title().toHtmlEscaped(), tr("Edit entry"))); } } diff --git a/src/http/Service.cpp b/src/http/Service.cpp index ceec292d6..0ac0fd836 100644 --- a/src/http/Service.cpp +++ b/src/http/Service.cpp @@ -480,7 +480,8 @@ void Service::updateEntry(const QString &, const QString &uuid, const QString &l //ShowNotification(QString("%0: You have an entry change prompt waiting, click to activate").arg(requestId)); if ( HttpSettings::alwaysAllowUpdate() || QMessageBox::warning(0, tr("KeePassXC: Update Entry"), - tr("Do you want to update the information in %1 - %2?").arg(QUrl(url).host()).arg(u), + tr("Do you want to update the information in %1 - %2?") + .arg(QUrl(url).host().toHtmlEscaped()).arg(u.toHtmlEscaped()), QMessageBox::Yes|QMessageBox::No) == QMessageBox::Yes ) { entry->beginUpdate(); entry->setUsername(login);