Skip to content

Commit 0d478de

Browse files
committed
Escape HTML chars
IB-8019 Signed-off-by: Raul Metsma <[email protected]>
1 parent 4384a8c commit 0d478de

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

client/dialogs/SignatureDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ SignatureDialog::SignatureDialog(const DigiDocSignature &signature, QWidget *par
110110
d->showErrors->show();
111111

112112
QString name = !c.isNull() ? c.toString(c.showCN() ? QStringLiteral("CN serialNumber") : QStringLiteral("GN SN serialNumber")) : s.signedBy();
113-
d->title->setText(QStringLiteral("%1 | %2%3</font>").arg(name, style, status));
113+
d->title->setText(QStringLiteral("%1 | %2%3</font>").arg(name.toHtmlEscaped(), style, status));
114114
d->close->setFont(Styles::font(Styles::Condensed, 14));
115115
connect(d->close, &QPushButton::clicked, this, &SignatureDialog::accept);
116116

client/dialogs/SignatureDialog.ui

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ QScrollBar::sub-line:vertical {
202202
<height>31</height>
203203
</size>
204204
</property>
205+
<property name="textFormat">
206+
<enum>Qt::PlainText</enum>
207+
</property>
205208
<property name="textInteractionFlags">
206209
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
207210
</property>
@@ -231,6 +234,9 @@ QScrollBar::sub-line:vertical {
231234
<height>31</height>
232235
</size>
233236
</property>
237+
<property name="textFormat">
238+
<enum>Qt::PlainText</enum>
239+
</property>
234240
<property name="textInteractionFlags">
235241
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
236242
</property>
@@ -260,6 +266,9 @@ QScrollBar::sub-line:vertical {
260266
<height>31</height>
261267
</size>
262268
</property>
269+
<property name="textFormat">
270+
<enum>Qt::PlainText</enum>
271+
</property>
263272
<property name="textInteractionFlags">
264273
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
265274
</property>
@@ -289,6 +298,9 @@ QScrollBar::sub-line:vertical {
289298
<height>31</height>
290299
</size>
291300
</property>
301+
<property name="textFormat">
302+
<enum>Qt::PlainText</enum>
303+
</property>
292304
<property name="wordWrap">
293305
<bool>true</bool>
294306
</property>
@@ -327,6 +339,9 @@ QScrollBar::sub-line:vertical {
327339
<height>300</height>
328340
</size>
329341
</property>
342+
<property name="textFormat">
343+
<enum>Qt::PlainText</enum>
344+
</property>
330345
<property name="wordWrap">
331346
<bool>true</bool>
332347
</property>

client/widgets/AddressItem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ AddressItem::AddressItem(CKey k, QWidget *parent, bool showIcon)
6565
ui->key.cert.subjectInfo("GN").join(' ') + " " + ui->key.cert.subjectInfo("SN").join(' ') :
6666
ui->key.cert.subjectInfo("CN").join(' ')).toHtmlEscaped();
6767
if(ui->label.isEmpty())
68-
ui->label = ui->key.recipient;
68+
ui->label = ui->key.recipient.toHtmlEscaped();
6969
setIdType();
7070
showButton(AddressItem::Remove);
7171
}

0 commit comments

Comments
 (0)