Skip to content

Commit 04e49b7

Browse files
author
Martin Brecht-Precht
committed
Added encoding to the HTML attributes.
1 parent 9cfb502 commit 04e49b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Handler/HtmlTagBuilder/HtmlTagBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ protected function getAttributeString(array $attributes): string
127127
if (empty($value)) {
128128
continue;
129129
}
130+
$value = htmlspecialchars($value, ENT_COMPAT | ENT_SUBSTITUTE);
130131
$attributeParts[] = mb_strtolower($key) . '="' . $value . '"';
131132
}
132133
unset($value);

0 commit comments

Comments
 (0)