Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

XSS filter triming attribute name="class" in "a" tag of rich text editor

Avatar

Level 1

Hello All,

I am trying to edit the HTML in rich text editor. I am trying to add a class attribute to anchor tag but somehow the class is not being added.

My assumption is that XSS filter is disabling this. Could you please help me with this?

1 Accepted Solution

Avatar

Correct answer by
Level 10

The article [1] is an example of target attribute to configure xss. On similar line you can modify xss as per your requirement.

[1]   http://helpx.adobe.com/experience-manager/kb/target-attribut-issue-tag.html

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

The article [1] is an example of target attribute to configure xss. On similar line you can modify xss as per your requirement.

[1]   http://helpx.adobe.com/experience-manager/kb/target-attribut-issue-tag.html

Avatar

Level 10

When you say 'modify the HTML' - do you mean you want to modify the style of the RTE text - can you please provide more details? 

Have you read AEM docs on configuring the RTE:

http://docs.adobe.com/docs/en/cq/current/administering/configuring_rich_text_editor.html

Avatar

Level 1

Hello Donald,

When I say I am editing HTML, I mean to edit using misctools plugin.

< a href="# "  class="fancy-box"> </a> 

I am trying to add a class in <a> tag, as shown above. I save the changes and preview the page. I don't see the result as expected but when I open the RTE again to see the class is there. I am not sure why ?

      
misctoolsspecialchars
sourceedit

Miscellaneous tools allowing you to enter special characters or edit the HTML source.

See Adding Special Characters if you want to define your own list.