
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2017 05:28 AM
Hi all,
While knowledge creation some of HTML code is removed by service now. I realize there might be some limitation. Using HTML sanitize configuration I would like to save from removing this block of code : <a href="tel:phone number"></a>. The code turns all phone numbers to clickable.
I was trying to insert in System Definition->Script Inculde->HTMLSanitizerConfig this:
HTML_WHITELIST:{
a:{
attribute:["href"],
attributeValuePattern:{href:"tel:"}
},
It does not work:(
Could you please advice?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 07:09 AM
I've run into a similar issue, but the above code is actually not working at all. You actually need to extend the supported protocols used in url attributes by:
HTML_WHITELIST : {
globalAttributes: {
attribute:[],
attributeValuePattern:{}
},
urlAttributes: { "protocols" : ["tel"] }
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2017 08:01 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2018 05:49 PM
Try this in System Definition->Script Includes->HTMLSanitizerConfig:
HTML_WHITELIST : {
globalAttributes: {
attribute:[],
attributeValuePattern:{}
},
a:{
attribute:[],
attributeValuePattern:{href:"tel:*"}
},
},

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2018 07:09 AM
I've run into a similar issue, but the above code is actually not working at all. You actually need to extend the supported protocols used in url attributes by:
HTML_WHITELIST : {
globalAttributes: {
attribute:[],
attributeValuePattern:{}
},
urlAttributes: { "protocols" : ["tel"] }
}