Skip to content

Commit 1770a97

Browse files
committed
HTML escape the wallet name in more dialogs and notifications
1 parent 189c19e commit 1770a97

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ void SendCoinsDialog::on_sendButton_clicked()
283283
// generate amount string with wallet name in case of multiwallet
284284
QString amount = BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), rcp.amount);
285285
if (model->isMultiwallet()) {
286-
amount.append(tr(" from wallet '%1'").arg(model->getWalletName()));
286+
amount.append(tr(" from wallet '%1'").arg(GUIUtil::HtmlEscape(model->getWalletName())));
287287
}
288288

289289
// generate address string

src/qt/walletcontroller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void WalletController::closeWallet(WalletModel* wallet_model, QWidget* parent)
7575
{
7676
QMessageBox box(parent);
7777
box.setWindowTitle(tr("Close wallet"));
78-
box.setText(tr("Are you sure you wish to close wallet <i>%1</i>?").arg(wallet_model->getDisplayName()));
78+
box.setText(tr("Are you sure you wish to close wallet <i>%1</i>?").arg(GUIUtil::HtmlEscape(wallet_model->getDisplayName())));
7979
box.setInformativeText(tr("Closing the wallet for too long can result in having to resync the entire chain if pruning is enabled."));
8080
box.setStandardButtons(QMessageBox::Yes|QMessageBox::Cancel);
8181
box.setDefaultButton(QMessageBox::Yes);

src/qt/walletview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void WalletView::processNewTransaction(const QModelIndex& parent, int start, int
172172
QString address = ttm->data(index, TransactionTableModel::AddressRole).toString();
173173
QString label = ttm->data(index, TransactionTableModel::LabelRole).toString();
174174

175-
Q_EMIT incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address, label, walletModel->getWalletName());
175+
Q_EMIT incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address, label, GUIUtil::HtmlEscape(walletModel->getWalletName()));
176176
}
177177

178178
void WalletView::gotoOverviewPage()

0 commit comments

Comments
 (0)