MDL-29442 add missing utf-8 to entity html encoding and decoding
This commit is contained in:
committed by
Sam Hemelryk
parent
79b123d1be
commit
cb4193da9f
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user