Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Sightly removing "x-cq-linkcheker" attribute in anchor tag

Avatar

Level 3

Hi,

We are adding "x-cq-linkchecker" attribute to anchor tag using RTE link customization , Value stored in JCR but when we render using sightly code  "x-cq-linkchecker" is removed from anchor tag.

AEM Version: AEM Cloud as service (Local Jar file)

JCR data:

Balu_M_0-1654404945258.png

 

Rendered content:

Balu_M_1-1654405075733.png

 

HTL code:

 

Using Core components Text(V2)

 

 <p class="cmp-text__paragraph"
data-sly-unwrap="${textModel.isRichText}">${text @ context = textModel.isRichText ? 'html' : 'text'}</p>

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Balu_M ,

 

1. Override libs/cq/xssprotection/config.xml to include data attributes: This will allow context html to render them.

2. To avoid RTE editor to strip them, Disable xss filtering for both dialog and inplace editor by adding the property to the text node and the config node of the cq:inplaceEditing node using the disableXSSFiltering property of the RTE.

Reference: http://experience-aem.blogspot.com/2017/01/aem-62-touch-ui-extend-rich-text-link-dialog-add-rel-sele...

Hope that help you!

Regards,
Santosh

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Balu_M ,

 

1. Override libs/cq/xssprotection/config.xml to include data attributes: This will allow context html to render them.

2. To avoid RTE editor to strip them, Disable xss filtering for both dialog and inplace editor by adding the property to the text node and the config node of the cq:inplaceEditing node using the disableXSSFiltering property of the RTE.

Reference: http://experience-aem.blogspot.com/2017/01/aem-62-touch-ui-extend-rich-text-link-dialog-add-rel-sele...

Hope that help you!

Regards,
Santosh