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

SOLVED

Something other than the Link Checker that would modify markup?

Joel_Triemstra1
Level 4
Level 4

Is there a service other than the Link Checker that would modify href attributes in markup?

I have a servlet that returns some json data. Part of that data is a string representing a Handlebars template, which includes a section (after escaping) like <a href=\'{{{this.url}}}\'><img src=... . This is getting rewritten somewhere along the way to <a href="\"><img src='{{{this.url}}}'

I have tried configuring the Day CQ Link Checker Transformer to Disable Rewriting and Disable Checking; I have removed "a:href" from the list of elements to rewrite; I have tried adding "\" and "{" to the Special Link Prefixes option in the Day CQ Link Checker Service configuration. None of these are having any effect. So, I'm thinking maybe there's some other service that's detecting that <a href=\'{{{this.url}}}\'> is not valid markup and fixing it for me, but I'm not finding any obvious candidates for that.

1 Accepted Solution
Feike_Visser1
Correct answer by
Employee
Employee

XSS might be another one you can check.

Here a link on changing the config: https://helpx.adobe.com/experience-manager/kb/target-attribut-issue-tag1.html

View solution in original post

2 Replies
Feike_Visser1
Correct answer by
Employee
Employee

XSS might be another one you can check.

Here a link on changing the config: https://helpx.adobe.com/experience-manager/kb/target-attribut-issue-tag1.html

kautuk_sahni
Employee
Employee

Hi Joel Triemstra

Option 1

Using OSGI as a service can also be one of the way. Where you could write a logic to create dynamic links and can use then in JSP scripts.

Link:-  https://helpx.adobe.com/experience-manager/using/creating-link-rewrite.html (this link will help you to understand the above stated, but you need to modify the logic of OSGi as per your requirement).

Option 2

Use Sightly

we can store information in JCR nodes and then can use them in JSP using Sightly

Link:- http://docs.adobe.com/content/docs/en/aem/6-0/develop/sightly.html#Getting Started

 

I hope this would help you.

 

Thanks and Regards

Kautuk Sahni