Skip to content

Commit e95eba9

Browse files
committed
1 parent 74e641c commit e95eba9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

system/Test/DOMParser.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ public function getBody(): string
6161
*/
6262
public function withString(string $content)
6363
{
64-
// converts all special characters to HTML-Entities
65-
$content = htmlentities($content);
66-
$content = htmlspecialchars_decode($content);
64+
// encode character to HTML numeric string reference
65+
$content = mb_encode_numericentity($content, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8');
6766

6867
// turning off some errors
6968
libxml_use_internal_errors(true);

0 commit comments

Comments
 (0)