The XSS payload example used in doc is <b><img src='' onerror='alert(\'hax\')'>I'm not trying to XSS you</b> is invalid, which won't popup hax in real browser.
In HTML attribute, the backslash can't escape quote in string. It should use HTML escape like <b><img src='' onerror='alert('hax')'>I'm not trying to XSS you</b> or directly use <b><img src='' onerror=alert('hax')>I'm not trying to XSS you</b>.
The XSS payload example used in doc is
<b><img src='' onerror='alert(\'hax\')'>I'm not trying to XSS you</b>
is invalid, which won't popuphax
in real browser. In HTML attribute, the backslash can't escape quote in string. It should use HTML escape like<b><img src='' onerror='alert('hax')'>I'm not trying to XSS you</b>
or directly use<b><img src='' onerror=alert('hax')>I'm not trying to XSS you</b>
.