Updating policy file with html5 and css3

522 views Asked by At

We have been using antisamy for our product but now with new HTML5 tags and css3 styles introduced its becoming a pain point to go and allow specific styles with defined values.

Is there any open source antisamy policy file that has full support for new tags and styles. All the open antisamy policy files that are available online do not have support for HTML5 and CSS3.

Another Option

If I have to go and change the policy file to adjust all the HTML5 tags and CSS3 styles is there a way that I can adjust the styles so that I don't have to at least adjust the browser prefixes. For below example if we have a way to have browser-radius for "-moz-border-radius" or "-webkit-border-radius" or "border-radius"

eg.

<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>
1

There are 1 answers

1
Roshan On

As this css property you can define in the css-rules section. Also as per w3schools the border-radius property accepts length or percentage so you can use already available regex length and percentage.

<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>