tel: link not working

Jon Ulrich
Kilo Guru

I added a column to the Notification Device [cmn_notif_device] table to hold "Display Value"

This value will be a link for the user to initiate a communication to that device, weather a mailto: link or a tel: link

The mail to links are working great. They put this value in the field:

[code]<a href="mailto:foo.bar@company.com">foo.bar@company.com</a>[/code]

That is working great, but if I use a tel link, it does not appear to work as a link at all:

[code]<a href="tel:1234567890">1234567890</a>[/code]

I have tried with +1, formatted with dashes or parentheses but nothing is working. I made the same link in a UI page and the link works fine. It feels like servicenow is removing the link if it contains tel.

Has anyone had this same problem, or have any other recommendations on how to make a clickable link to call someone in a field in a table?

Thanks!

1 ACCEPTED SOLUTION

Mike Rae
Kilo Guru

You need to update the HTML Sanitize white list to allow the tel protocol to be used.   Edit the HTMLSanitizerConfig script include and update the HTML_WHITELIST property to look like this:

HTML_WHITELIST: {
urlAttributes: { "protocols" : [ "tel" ] },
globalAttributes: {
attribute: [],
attributeValuePattern: {}
}
},

View solution in original post

2 REPLIES 2

Mike Rae
Kilo Guru

You need to update the HTML Sanitize white list to allow the tel protocol to be used.   Edit the HTMLSanitizerConfig script include and update the HTML_WHITELIST property to look like this:

HTML_WHITELIST: {
urlAttributes: { "protocols" : [ "tel" ] },
globalAttributes: {
attribute: [],
attributeValuePattern: {}
}
},

This solved my problem. Thanks!