Skip to content

Commit 8ea8134

Browse files
authored
Merge pull request #79 from forkcms/fix-spoon-form-attributes-xss
Fix xss issue with form attributes
2 parents e86d149 + b27d38b commit 8ea8134

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spoon/form/attributes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ protected function getAttributesHTML(array $variables)
7575
else
7676
{
7777
$html .= ' ' . $key;
78-
if($value !== null) $html .= '="' . str_replace(array_keys($variables), array_values($variables), $value) . '"';
78+
if($value !== null) $html .= '="' . Spoonfilter::htmlSpecialChars(str_replace(array_keys($variables), array_values($variables), $value)) . '"';
7979
}
8080
}
8181

0 commit comments

Comments
 (0)