Values are encoded consistently by the formbuilder and the htmlbuilder

This commit is contained in:
Stefan Printezis committed 2016-10-28 12:37:15 +02:00
1 parent abec449ed8
commit c1a105975b
4 files changed
+40 -15

No files matched your search

+3 -3
View File
@@ -288,7 +288,7 @@ class HtmlBuilder
{
return str_repeat(' ', $num);
}
/**
* Generate an ordered list of items.
*
@@ -387,7 +387,7 @@ class HtmlBuilder
if (is_array($value)) {
return $this->nestedListing($key, $type, $value);
} else {
return '<li>' . e($value) . '</li>';
return '<li>' . htmlentities($value, ENT_QUOTES, 'UTF-8') . '</li>';
}
}
@@ -449,7 +449,7 @@ class HtmlBuilder
}
if (! is_null($value)) {
return $key . '="' . e($value) . '"';
return $key . '="' . htmlentities($value, ENT_QUOTES, 'UTF-8') . '"';
}
}