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
The HTML parser removes the single use of < character form the given string . for example
<?phpuseMasterminds\HTML5;
$html = '<img src="invalid-url" onerror="alert(\'XSS Attack prefix\')" /> 2 > 1 & 3 < 5 and some more text';
// Parse the document. $dom is a DOMDocument.$html5 = newHTML5();
$dom = $html5->loadHTML($html);
// Render it as HTML5:
print $html5->saveHTML($dom);
the printing of $html5->saveHTML($dom) should return
<!DOCTYPE html>
<html><img src="invalid-url" onerror="alert('XSS Attack prefix')"> 2 > 1 & 3 < 5 and some more text</html>
but instead it returns
<!DOCTYPE html>
<html><img src="invalid-url" onerror="alert('XSS Attack prefix')"> 2 > 1 & 3 5 and some more text</html>
See the missing encoded < of < character .
The text was updated successfully, but these errors were encountered:
Sorry for duplicate post as for some reason at the first submission, github showed Something went wrong and thought it did not saved . It can be removed/closed in prefer to #250
The HTML parser removes the single use of
<
character form the given string . for examplethe printing of
$html5->saveHTML($dom)
should returnbut instead it returns
See the missing encoded
<
of<
character .The text was updated successfully, but these errors were encountered: