RTE stripping tel: links

Avatar

Avatar
Level 1
ChadLeathers
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
ChadLeathers
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile
ChadLeathers
Level 1

01-09-2020

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 
 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

572 likes

Total Posts

726 posts

Correct reply

239 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

572 likes

Total Posts

726 posts

Correct reply

239 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

01-09-2020

Hi @ChadLeathers,

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

Answers (1)

Answers (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

645 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

645 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

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