내 커뮤니티 업적 표시줄을 확대합니다.

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

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Linkchecker replacing href from <a> tag

Avatar

이전 커뮤니티 멤버

Hi,

 

We have created a component similar to an RTE component. when dragged on page, It enables the user to enter some Java script or CSS and write HTML to create custom content as per the users requirement. Now we are sending the details of the page in JSON to front end system. The JSON is generated using custom query builder. that is based on query builder available OOB. 

In the component, I am adding the HTML code as: <a href="http://google.com"> Testing</a>

When I hit the URL to create the JSON, this is the value from server before it hits client: 

{"hits":[{"jcr:primaryType":"nt:unstructured","htmlBlock":"<a  href="http://google.com"> Testing</a>","jcr:lastModifiedBy":"admin","moduleType":"rwdHtmlPromoModule","name":"promo","jcr:lastModified":"Thu Nov 05 2015 17:22:28 GMT+0530",":moduleUrl":"/content/Assets/Reference-Components/html-promo-modules/promo-1/jcr:content/htmlpromomodule","sling:resourceType":"webcms-ngtv/components/content/htmlPromoModule","parentPath":"/content/-Assets/Reference-Components/html-promo-modules/promo-1"}]}

 

but when the json is displayed on the browser link checker removes the href value and inserts some code of itself that says the link is invalid. the resulting json is:

{"hits":[{"jcr:primaryType":"nt:unstructured","htmlBlock":"<img src="/libs/cq/linkchecker/resources/linkcheck_o.gif" alt="invalid link: skip\" title="invalid link: skip\" border="0"> Testing</a>","jcr:lastModifiedBy":"admin","moduleType":"rwdHtmlPromoModule","name":"promo","jcr:lastModified":"Thu Nov 05 2015 17:22:28 GMT+0530",":moduleUrl":"/content/Assets/Reference-Components/html-promo-modules/promo-1/jcr:content/htmlpromomodule","sling:resourceType":"webcms-ngtv/components/content/htmlPromoModule","parentPath":"/content/Assets/Reference-Components/html-promo-modules/promo-1"}]}

 

I tried disabling the linkchecker but still getting the same result. I have added the pattern as exception in one of the configurators for linkchecker but still no success. 

 

Any pointers whats going wrong in this..??

 

Thanks,

Anuj Rattan

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 10
What AEM version are you using. If using 6; have you considered SightLy?  Is backend a custom OSGI service?  The link checker typically will not change markup generated by a backend service.

원본 게시물의 솔루션 보기

1 답변 개

Avatar

정확한 답변 작성자:
Level 10
What AEM version are you using. If using 6; have you considered SightLy?  Is backend a custom OSGI service?  The link checker typically will not change markup generated by a backend service.