1

我们一直在为我们的产品使用 antisamy,但现在新的 HTML5 标签和 css3 样式引入了它成为一个痛点,并允许具有定义值的特定样式。

有没有完全支持新标签和样式的开源 antisamy 策略文件。在线提供的所有开放式反叛政策文件都不支持 HTML5 和 CSS3。

另外的选择

如果我必须去更改策略文件以调整所有 HTML5 标记和 CSS3 样式,有没有一种方法可以调整样式,这样我至少不必调整浏览器前缀。对于下面的示例,如果我们有办法让“-moz-border-radius”或“-webkit-border-radius”或“border-radius”具有浏览器半径

例如。

<common-attributes>
    <attribute name="border-radius" description="The 'id' of any HTML attribute should not contain anything besides letters and numbers">
    <regexp-list>
    <regexp value="<regular-expression>"/>
    </regexp-list>
    </attribute>
</common-attributes>
4

1 回答 1

-1

作为这个 css 属性,您可以在 css-rules 部分中定义。同样根据 w3schools,border-radius 属性接受长度或百分比,因此您可以使用已经可用的正则表达式长度和百分比。

<property name="border-radius" description="This property allows you to add rounded borders to elements">
    <regexp-list>
                                <regexp name="percentage"/>
                                <regexp name="length"/>
    </regexp-list>
</property>
于 2013-12-18T06:35:45.730 回答