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.
Views
Replies
Total Likes
@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 https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/script-issue-with-rte/m-p/...
Thanks
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).
Thanks!!
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.
component.html
<table>
<tbody><tr><td>hey</td>
<td>hu</td>
</tr><tr><td><img src="img.png" alt=""></td>
<td>hi</td>
</tr></tbody>
</table>
We don't have any URL transformer in our site. I even tried disabling the ootb link checker configuration, still the issue persists.
Thanks @ShaileshBassi - 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.
Please find the screenshot-
We have just extended the core text component and we haven't done any customizations.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies