Closed AnderssonPeter closed 1 month ago
I think this is because the body tag gets discarded by the AngleSharp parser before HtmlSanitizer gets a chance to sanitize it. This in turn is because the Sanitize
method is intended to sanitize HTML fragments (elements inside body). If you want to sanitize a whole HTML document you need to call SanitizeDocument
.
Hi when i run
isValid
is stilltrue
butsantatized
is not the same ascontent
For context I'm just trying to check if the string contains any html with a few exceptions..