diff --git a/src/Support/Helper.php b/src/Support/Helper.php index b7b3da7cf..b249871bc 100755 --- a/src/Support/Helper.php +++ b/src/Support/Helper.php @@ -151,7 +151,9 @@ public static function buildHtmlAttributes($attributes) $element = ''; if ($value !== null) { - $element = $key.'="'.htmlentities($value, ENT_QUOTES | ENT_HTML5, 'UTF-8').'" '; + // FIX: ENT_HTML5 named-entity table encodes "_" -> "_" etc., + // breaking attribute values like name="foo_bar". Use ENT_QUOTES only. + $element = $key.'="'.htmlentities($value, ENT_QUOTES, 'UTF-8').'" '; } $html .= $element;