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

How to validate and throw error on invalid closing tags? #253

Open KishorMandve opened 2 years ago

KishorMandve commented 2 years ago

For an instance,

<P123> this is a para </p>

Above html text results into invalid html text because of tag .

But, if I write html as shown below then it's not giving any error and results into a valid html text.

<p> this is para </p123>

Expected result :- we want to validate closing tags same as it is validating opening tags and should return invalid closing tags in result set of string.

Please help on this.