Skip to content

Commit f7d7061

Browse files
author
Christian Leucht
committed
Checkbox/Radio // no escaping for choice labels. It can be possible that those labels actually have HTML in text.
1 parent 6bd447a commit f7d7061

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/View/Checkbox.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function render(ElementInterface $element): string
5757
$label = sprintf(
5858
'<label for="%s">%s</label>',
5959
$this->escapeAttribute($elementAttr['id']),
60-
$this->escapeHtml($choice['label'])
60+
$choice['label']
6161
);
6262

6363
$html[] = sprintf(

src/View/Radio.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function render(ElementInterface $element): string
4444
$label = sprintf(
4545
'<label for="%s">%s</label>',
4646
$this->escapeAttribute($elementAttr['id']),
47-
$this->escapeHtml($choice['label'])
47+
$choice['label']
4848
);
4949

5050
$html[] = sprintf(

0 commit comments

Comments
 (0)