mganss / HtmlSanitizer

Cleans HTML to avoid XSS attacks
MIT License
1.51k stars 198 forks source link

Characters such as < and > are removed, even if they're not a tag #548

Closed kirkbushell closed 1 month ago

kirkbushell commented 1 month ago

Having a problem here due to supporting markdown - quote characters (>) and other characters (<) are being removed, even if it's not a full tag.

Ie. this text will have the less than character removed: "< 18" - which becomes just " 18".

Finally, is there a reason why b tags are being replaced with strong tags? This isn't a sanitisation mechanism.