1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge pull request #3512

TheNain38 (1):
      fix(groupinviteform): escape HTML
This commit is contained in:
sudden6 2016-07-16 23:40:14 +02:00
commit 56fe94dd5e
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -111,7 +111,7 @@ void GroupInviteForm::addGroupInvite(int32_t friendId, uint8_t type, QByteArray
QDateTime currentDateTime = QDateTime::currentDateTime(); QDateTime currentDateTime = QDateTime::currentDateTime();
QString date = currentDateTime.toString(Settings::getInstance().getDateFormat()); QString date = currentDateTime.toString(Settings::getInstance().getDateFormat());
QString time = currentDateTime.toString(Settings::getInstance().getTimestampFormat()); QString time = currentDateTime.toString(Settings::getInstance().getTimestampFormat());
groupLabel->setText(tr("Invited by <b>%1</b> on %2 at %3.").arg(name, date, time)); groupLabel->setText(tr("Invited by <b>%1</b> on %2 at %3.").arg(name.toHtmlEscaped(), date, time));
groupLayout->addWidget(groupLabel); groupLayout->addWidget(groupLabel);
QPushButton* acceptButton = new QPushButton(this); QPushButton* acceptButton = new QPushButton(this);
@ -212,7 +212,7 @@ void GroupInviteForm::retranslateGroupLabel(CroppingLabel* label)
QString date = invite.time.toString(Settings::getInstance().getDateFormat()); QString date = invite.time.toString(Settings::getInstance().getDateFormat());
QString time = invite.time.toString(Settings::getInstance().getTimestampFormat()); QString time = invite.time.toString(Settings::getInstance().getTimestampFormat());
label->setText(tr("Invited by <b>%1</b> on %2 at %3.").arg(name, date, time)); label->setText(tr("Invited by <b>%1</b> on %2 at %3.").arg(name.toHtmlEscaped(), date, time));
} }
void GroupInviteForm::retranslateAcceptButton(QPushButton* acceptButton) void GroupInviteForm::retranslateAcceptButton(QPushButton* acceptButton)