MDL-29442 add missing utf-8 to entity html encoding and decoding

This commit is contained in:
Petr Škoda
2012-12-11 10:23:31 +13:00
committed by Sam Hemelryk
parent 79b123d1be
commit cb4193da9f
9 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -14,9 +14,9 @@ require_once($CFG->dirroot . "/lib/outputcomponents.php");
class parser_utils {
public static function h($tag, $text = null, $options = array(), $escape_text = false) {
$tag = htmlentities($tag);
$tag = htmlentities($tag, ENT_COMPAT, 'UTF-8');
if(!empty($text) && $escape_text) {
$text = htmlentities($text);
$text = htmlentities($text, ENT_COMPAT, 'UTF-8');
}
return html_writer::tag($tag, $text, $options);
}