Expand my Community achievements bar.

Issue with tel:+ Links in Rich Text Component

Avatar

Level 2

Hello Adobe Community,

I'm encountering an issue with the Rich Text component in AEM when adding a tel: hyperlink.

Scenario:

I add a hyperlink with the format tel:+1234567890 in the Rich Text component's dialog.
After clicking "Done," the link behaves as expected on the page, opening the prompt to initiate a call when clicked.
The link is also correctly stored in the repository as tel:+1234567890.
Problem:

When I reopen the dialog to edit the link, the hyperlink is stripped, and the text appears as plain text, losing the hyperlink functionality in the dialog.
Interestingly, if I use tel:1234567890 (without the +), the link is preserved when reopening the dialog.
Has anyone else experienced this issue or have any suggestions on how to resolve it?

Thank you in advance for your help!

Best regards,
Aravind Yesugari

9 Replies

Hi @arunpatidar 

The issue I was facing is that when I am adding + character when I add tel:1234567890 the link is not getting striped ,when I try to add tel:+1234567890  then  the href is getting striped, and in the page it is rendering as link and showing the expected behavior but when i re open the dialog in dialog I am not able to unlink it  in dialog its showing as normal word but in page its rendering as link and if see in the repo as well its storing as tel:+1234567890.

I tried overlaying

/libs/cq/xssprotection/config.xml in /apps - /apps/cq/xssprotection/config.xml

Add the protocol, say telURL

<regexp name="telURL" value="tel:[0-9]+"/>

and Added telURL configuration to the accepted list of anchor href

<attribute name="href">
<regexp-list>
<regexp name="onsiteURL"/>
<regexp name="offsiteURL"/>
<regexp name="telURL"/>
</regexp-list>
</attribute>


as well but that doesn't worked .


Hi @aravindreddyyesugari18079 did you add "tel:" to the Link Checker Special Link Prefixes in the configuration: com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl. Search the configuration here:

http://localhost:4502/system/console/configMgr/

In my case, I was using a textfield and doing only the above worked fine for me. I also didn't touch the xssprotection config.

 

Hi @kapil_rajoria  I have added "tel:" to the Link Checker Special Link Prefixes in the configuration: com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl.

The functionality is working fine kapil without touching the xssprotection config but the issue is that when I try to unlink the link  I am unable to do it. When I open the dialog the link is getting stripped.

Hi @aravindreddyyesugari18079 Please use something like:

 

<a href="tel:${Your_Model.contactNumber}">
${Your_Model.contactNumber}
</a>

 

and you can use textfied with it.

This should work fine for all the scenerios. Thanks!

Hi @kapil_rajoria  The issue is not with the rendering . The issue is when I am trying to reopen the dialog and tries to unlink I am not able to unlink it .Below I am attaching the screen shot

Steps to reproduce :- 
1) Author the text component  and link with value tel:+1234567890

2) Then click on done , now on the page it will render as link and when we click on that click it will open a pop up to pick an app.

3) Go back to the page and try to unlink the link in dialog it will not visible as link it will available as plain text and that to when we add + character 

try with tel:1234567890 the link will not get stripped.

Hi @aravindreddyyesugari18079 ,
use two textfields(one for display name and other for link) and not single RTE.
RTE sometimes don't work as expected. Make sure your RTE implementation code is correct.

Avatar

Administrator

@aravindreddyyesugari18079 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni

Avatar

Community Advisor

@aravindreddyyesugari18079 This is the problem with AEM cloud instance. RTE will not accept the special characters like +,( and white space etc. so whenever you want to author telephone number just put tel:919876543210 instead of tel:+919876543210 or any country pattern.