Open MNF opened 3 years ago
HtmlSanitizer seems to be a more powerful and more complex solution.
For my purpose, I needed to change the code a bit, and then HtmlRuleSanitizer (and the underlying Html Agility Pack) proved much easier than HtmlSanitizer (based on the very challenging AngleSharp).
However, if you just need to use the code as-is, and don't care about the underlying complexity, then HtmlSanitizer may be the better choice.
Just my opinion as a user.
The primary difference with HtmlSanitizer is indeed the HTML parser being used in the background. The Html Agility Pack was not really maintained for some time in history, but is again maintained actively for the past years. HtmlSanitizer uses the AngleSharp package to parse HTML, which I read to be more strict (and thus less easy to work with low quality HTML code), but I have no personal experience with it.
In addition HtmlSanitizer allows for extensive CSS sanitization, which HtmlRuleSanitizer does not do.
Can you provide in ReadMe Comparison with HtmlSanitizer package https://github.com/mganss/HtmlSanitizer? It’s hard to choose one, and description when one or another is more suitable will be useful.