You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
// Assuming you installed from Composer:
require "vendor/autoload.php";
use Masterminds\HTML5;
// An example HTML document:
$html = <<< 'HERE'
<html>
<head>
<title>TEST</title>
</head>
<body id='foo'>
<p>²</p>
</body>
</html>
HERE;
// Parse the document. $dom is a DOMDocument.
$html5 = new HTML5();
$dom = $html5->loadHTML($html);
// Render it as HTML5:
print $html5->saveHTML($dom);
?>
Expected Result is ², but its prints &³2;
I think, the problem is in https://github.com/Masterminds/html5-php/blob/2.x/src/HTML5/Parser/Tokenizer.php#L1074 where only AsciiAlpha are returned, but &sub2; needs the number. Therefore the call should be Scanner::getAsciiAlphaNum.
The text was updated successfully, but these errors were encountered: