Add more table elements attributes to whitelist
This commit is contained in:
parent
5a4a9042f1
commit
f69ac0662a
1 changed files with 7 additions and 0 deletions
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in a new issue