Leiste mit Community-Erfolgen erweitern.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.

GELÖST

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 Akzeptierte Lösung

Avatar

Korrekte Antwort von
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


Santosh Sai

AEM BlogsLinkedIn


Lösung in ursprünglichem Beitrag anzeigen

1 Antwort

Avatar

Korrekte Antwort von
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


Santosh Sai

AEM BlogsLinkedIn