OWASP / java-html-sanitizer

Takes third-party HTML and produces HTML that is safe to embed in your web application. Fast and easy to configure.
Other
834 stars 209 forks source link

Stripping off the contents when the extra comment tag has added with never ending #258

Open rupeshtelus opened 2 years ago

rupeshtelus commented 2 years ago

Hi,

We are using this library in Zimbra for sanitization of the e-mail body and during sanitization of the customer-generated HTML, we came across the following situation when we have extra comment tag in html code (<!--) sanitization is not working as during sanitization, it is not able to parse properly and the whole HTML is stripped off.

image

Actually inside