Add more table elements attributes to whitelist

This commit is contained in:
cketti 2018-01-04 03:39:29 +01:00
parent 5a4a9042f1
commit f69ac0662a

View file

@ -15,6 +15,13 @@ public class HtmlSanitizer {
Whitelist whitelist = Whitelist.relaxed()
.addTags("font", "hr", "ins", "del")
.addAttributes("table", "align", "bgcolor", "border", "cellpadding", "cellspacing", "width")
.addAttributes("tr", "align", "bgcolor", "valign")
.addAttributes("th",
"align", "bgcolor", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "sorted",
"valign", "width")
.addAttributes("td",
"align", "bgcolor", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "valign",
"width")
.addAttributes(":all", "class", "style", "id")
.addProtocols("img", "src", "http", "https", "cid", "data");