RTE stripping tel: links | Community
Skip to main content
September 1, 2020
Solved

RTE stripping tel: links

  • September 1, 2020
  • 2 replies
  • 1901 views
Is there a known workaround for Authors to link phone numbers within an RTE in a way the "tel:"  doesn't get stripped out ? 
 
If we put this in an RTE : 
<a href="tel:123-456-7890">123-456-7890</a> 
 
It removes the href 
 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Vijayalakshmi_S

Hi @chadleathers,

Detailed steps for retaining href with tel links is explained in below blog post.

2 replies

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
September 1, 2020

Hi @chadleathers,

Detailed steps for retaining href with tel links is explained in below blog post.

September 1, 2020
Thank you!
BrianKasingli
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 1, 2020

You will need to add the special link prefix via OSGI console (OSGI configuration),

  1. Visit http://localhost:4502/system/console/configMgr/com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl
  2. From the Special link prefixes, add "tel:"
  3. Save.
  4. Test.

This will enable the special link prefix only in the author environment. It's best practice to store this OSGI configuration in your code, so the configuration is distributed throughout your AEM environments upon content package installation.

Simply create an XML file under /apps/my-site/config/com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl.xml, with the following context:

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" scheduler.concurrent="{Boolean}false" scheduler.period="{Long}5" service.bad_link_tolerance_interval="{Long}48" service.cache_broken_internal_links="{Boolean}false" service.check_override_patterns="[^system/]" service.special_link_patterns="" service.special_link_prefix="[javascript&colon;,data:,mailto:,#,&lt;!--,${,http:,https:,tel:]"/>