-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
var san = HtmlSanitizer.SimpleHtml5Sanitizer();
foreach (var t in "p br i b tt strong".Split(" "))
{
san.Tag(t).RemoveEmpty();
}
var s = san.Sanitize("<html><script src=\"abc\"><body><p>ABC<b>abc</b><p>XYZ<b>xyz</p><u><li>abc<li>xyz</li></body></html>");
returns an empty string. Does your class sanitize not HTML documents but HTML fragments? This is not very useful when HTML comes from external sources beyond our control because it would then require preliminary stripping of
<html>, <head>, <body>
etc containers.
Metadata
Metadata
Assignees
Labels
No labels