diff options
author | Andrew Chow <achow101-github@achow101.com> | 2019-09-08 16:40:05 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2019-09-08 16:40:05 -0400 |
commit | 1770a972d471d2bdb36195ec370b6fc238649f4d (patch) | |
tree | 9161687066c65ebe94496547bc4771a1867637f6 /src | |
parent | 189c19e012427a0068fc51b9fcb1428dc28aa681 (diff) |
HTML escape the wallet name in more dialogs and notifications
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 2 | ||||
-rw-r--r-- | src/qt/walletcontroller.cpp | 2 | ||||
-rw-r--r-- | src/qt/walletview.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index f23c47736f..3ca70323af 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -283,7 +283,7 @@ void SendCoinsDialog::on_sendButton_clicked() // generate amount string with wallet name in case of multiwallet QString amount = BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), rcp.amount); if (model->isMultiwallet()) { - amount.append(tr(" from wallet '%1'").arg(model->getWalletName())); + amount.append(tr(" from wallet '%1'").arg(GUIUtil::HtmlEscape(model->getWalletName()))); } // generate address string diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp index 1a4f51c066..8b8283d3d8 100644 --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -75,7 +75,7 @@ void WalletController::closeWallet(WalletModel* wallet_model, QWidget* parent) { QMessageBox box(parent); box.setWindowTitle(tr("Close wallet")); - box.setText(tr("Are you sure you wish to close wallet <i>%1</i>?").arg(wallet_model->getDisplayName())); + box.setText(tr("Are you sure you wish to close wallet <i>%1</i>?").arg(GUIUtil::HtmlEscape(wallet_model->getDisplayName()))); box.setInformativeText(tr("Closing the wallet for too long can result in having to resync the entire chain if pruning is enabled.")); box.setStandardButtons(QMessageBox::Yes|QMessageBox::Cancel); box.setDefaultButton(QMessageBox::Yes); diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index be47f67f95..6734921c43 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -172,7 +172,7 @@ void WalletView::processNewTransaction(const QModelIndex& parent, int start, int QString address = ttm->data(index, TransactionTableModel::AddressRole).toString(); QString label = ttm->data(index, TransactionTableModel::LabelRole).toString(); - Q_EMIT incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address, label, walletModel->getWalletName()); + Q_EMIT incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address, label, GUIUtil::HtmlEscape(walletModel->getWalletName())); } void WalletView::gotoOverviewPage() |