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

Don't Support <![CDATA[ ]]> #246

Open jimmyleeeeee opened 2 years ago

jimmyleeeeee commented 2 years ago

The exmaple Code: String html = "<![CDATA[" + "TestData" + "]]>"; String expected = "<![CDATA[TestData]]>"; SanitizedResult result =org.owasp.html.HtmlSanitizer.sanitize(html, hcr.getWrappedPolicy()); assertEquals(expected, result.getCleanHTML());

In my case, the input with CDATA is OK. But, after Sanitizer, the output data is empty. Is it possible to support CDATA?