jhy / jsoup

jsoup: the Java HTML parser, built for HTML editing, cleaning, scraping, and XSS safety.
https://jsoup.org
MIT License
10.96k stars 2.2k forks source link

Whitelist.relaxed() - no HTML5 tags #853

Open zafarella opened 7 years ago

zafarella commented 7 years ago

Hi there,

My question is, how you guys was adding html5 tags. I was normally using https://jsoup.org/apidocs/org/jsoup/safety/Whitelist.html#relaxed-- and was doing my cleaning, however, recently came over the figure and few other tags (https://www.w3.org/TR/html5/grouping-content.html#the-figure-element), which is part of html5 spec.

What is the workaround u use? Just whitelisting tags ? Thanks in advance

jhy commented 7 years ago

If you would like to send in a PR I'd be happy to review, thanks.