我发现了同样的问题,唯一的解决方案是将白名单样式粘贴到 HTML 净化器添加属性设置中。
白名单设置为:
a.class,
a.href,
a.id,
a.name,
a.rev,
a.style,
a.title,
a.target,
a.rel,
abbr.title,
acronym.title,
blockquote.cite,
div.align,
div.style,
div.class,
div.id,
font.size,
font.color,
h1.style,
h2.style,
h3.style,
h4.style,
h5.style,
h6.style,
img.src,
img.alt,
img.title,
img.class,
img.align,
img.style,
img.height,
img.width,
li.style,
ol.style,
p.style,
span.style,
span.class,
span.id,
table.class,
table.id,
table.border,
table.cellpadding,
table.cellspacing,
table.style,
table.width,
td.abbr,
td.align,
td.class,
td.id,
td.colspan,
td.rowspan,
td.style,
td.valign,
tr.align,
tr.class,
tr.id,
tr.style,
tr.valign,
th.abbr,
th.align,
th.class,
th.id,
th.colspan,
th.rowspan,
th.style,
th.valign,
ul.style