Merge pull request #7166 from annando/revert-7158

Revert PR 7158 since it breaks umlauts
This commit is contained in:
Hypolite Petovan
2019-05-19 07:37:01 -04:00
committed by GitHub

View File

@@ -471,7 +471,7 @@ class XML
*/ */
public static function escape($str) public static function escape($str)
{ {
$buffer = htmlentities($str, ENT_QUOTES, 'UTF-8'); $buffer = htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
$buffer = trim($buffer); $buffer = trim($buffer);
return $buffer; return $buffer;
@@ -485,7 +485,7 @@ class XML
*/ */
public static function unescape($s) public static function unescape($s)
{ {
$ret = html_entity_decode($s, ENT_QUOTES); $ret = htmlspecialchars_decode($s, ENT_QUOTES);
return $ret; return $ret;
} }