Add 'background' attribute for 'table' tag to the whitelist

This commit is contained in:
cketti 2018-01-04 04:50:23 +01:00
parent 75fba6898f
commit 13c24c26f4

View file

@ -14,7 +14,8 @@ public class HtmlSanitizer {
HtmlSanitizer() { HtmlSanitizer() {
Whitelist whitelist = Whitelist.relaxed() Whitelist whitelist = Whitelist.relaxed()
.addTags("font", "hr", "ins", "del") .addTags("font", "hr", "ins", "del")
.addAttributes("table", "align", "bgcolor", "border", "cellpadding", "cellspacing", "width") .addAttributes("table", "align", "background", "bgcolor", "border", "cellpadding", "cellspacing",
"width")
.addAttributes("tr", "align", "bgcolor", "valign") .addAttributes("tr", "align", "bgcolor", "valign")
.addAttributes("th", .addAttributes("th",
"align", "bgcolor", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "sorted", "align", "bgcolor", "colspan", "headers", "height", "nowrap", "rowspan", "scope", "sorted",