leizongmin / js-xss

Sanitize untrusted HTML (to prevent XSS) with a configuration specified by a Whitelist
http://jsxss.com
Other
5.19k stars 630 forks source link

Self-closing tags doesnt make "isClosing" as true #225

Open mixalbl4-127 opened 3 years ago

mixalbl4-127 commented 3 years ago

code: some<hr/>test give result on "onTag" callback:

image

in my case it helps to me:

const selfClosing = new RegExp("\\/\\s*>$", "mg").test(html);