AntiSamy for TinyMce Style Attributes

I use antisamy in the text that I get from the tinymce editor.

I am using the antisamce-tinymce-1.4.4.xml file from owaspantisam . (as a policy file).

My problem is that it destroys all the string style tag attributes that I get from the tinymce editor. for example: If I have text, part of which is in red and the other part is underlined, the line that I get after clearing html with anti-Sami will have one color and retains only the underline style attribute. How can I save other style attributes? Has xml been changed so that it does not ignore style attributes?

Thanks in advance.

+4
source share
1 answer

You can always modify the policy file to suit your needs. check property

<property name="color" description=""> 

in css rules. check if the specified color matches the verification rules indicated there.

+4
source

Source: https://habr.com/ru/post/1348087/


All Articles