Expand my Community achievements bar.

SOLVED

RTE stripping tel: links

Avatar

Level 1
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 
 
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
4 Replies

Avatar

Correct answer by
Community Advisor

Hi @ChadLeathers,

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

Hi ,

 

In aem as cloud service without overlaying its working  but The issue is when we are trying to  opening the dialog again after adding hyperlink , the functionality is working but  in the dialog the text is not looking as link its looking as plane text

Avatar

Community Advisor

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:]"/>