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.

Automatically removing the link in RTE

Avatar

Level 2

Hi,

In the RTE when we are linking to their respective pages. Every time I try to add a link, if I exit out and go to edit and open the dialog ,the hyperlinks get removed in RTE. Could anyone help me on this.

Thanks & Regards,

Kalyan

8 Replies

Avatar

Level 10

check browser console and error.log for any errors/warnings. Does that happen on an internal link or external link?

Validate linkchecker config for your project as well.

Avatar

Level 2

Hi @gauravb41175071,

We Don’t see any errors and it removing both for internal and external links.

Thanks & Regards,

Kalyan

Avatar

Level 1

Hi Kalyan,

You have to  give anonymous user access in libs to make it work, please check and confirm

Avatar

Level 10

please share screenshots/logs/video in case you still face the issue

Avatar

Level 10

When you added this link in the Touch UI RTE - are you sure you clicked the Done button in the dialog. This saves the information.

Hi smacdonald2008​,

Yes I clicked on Done button and saved but still it is removing the link.

Thanks & Regards,

Kalyan

Avatar

Level 2

Hi Kalyan,

I expect you are adding certain characters in the href attribute which your xss protection is not satisfying. I believe you might be getting error something like [1].

Please confirm.

Regards,

Sumeet Chawla.

[1]: org.apache.sling.xss.impl.HtmlToHtmlContentContext AntiSamy warning: The a tag contained an attribute that we could not process. The href attribute had a value of <some dummy value>. This value could not be accepted for security reasons. We have chosen to remove this attribute from the tag and leave everything else in place so that we could process the input.