Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

RTE issue - HTML elements getting stripped off when added inside the table <td> attribute in AEM - 6.3


Level 2

We have extended the core text component in our website.

When I author an image / hyperlink inside the table <td> attribute in RTE, the image / hyperlink gets removed from the DOM on submission(image is not displayed and image tag is removed from the html).

When I add the image/hyperlink outside the table, its getting displayed. Please let me know if anyone has faced the similar issue.

@Vijayalakshmi_S  @arunpatidar @Suraj_Kamdi 

3 Replies


Community Advisor

@Vanitha_Duraisamy Trying customizing the "/libs/clientlibs/granite/richtext/core/js/HtmlSerializer.js" the one stripping out the src attribute from the img tag.

Please refer, there is a similar thread for this





Hi @Vanitha_Duraisamy,

If its being saved properly in jcr and attributes are not showing in RTE editor, then you might need to disable XSS filtering in your edit dialog. You can do this for RTE by adding the proeprty disableXSSfiltering={Boolean}true to your text node (where the sling resource type for RTE is).



Level 2

Thanks @vanegi 

Tried this but still the issue exists.

The dialog values are getting stored in JCR and I can view the image in dialog as well, On submission the <img> tag gets stripped out.



After Submission:



I also tried adding the below code directly in the component HTML file, same issue is happening. 

Even if I add <a href> element instead of <img> element, that also gets stripped off.


</tr><tr><td><img src="img.png" alt=""></td>


We don't have any URL transformer in our site. I even tried disabling the ootb link checker configuration, still the issue persists.

Thanks @Shailesh_Bassi_  - This doesn't seems like rte issue



Can you share the source code, and attach the screenshot of the node wherein you have added this property "disableXSSfiltering"? You can also check /libs/cq/xssprotection/config.xml for img tag valid rules.


Level 2


Please find the screenshot-


We have just extended the core text component and we haven't done any customizations.