Whenever I put a SIP link into an Icon Link widget URL field, ServiceNow adds 'unsafe:' in front of the URL, thus rendering this link useless.

tchaikin
Giga Expert

I'm trying to add a SIP link to an Icon Link widget on Service Portal in order to initiate a chat with our Service Desk via Skype for Business.   The URL I put in is sip:address@company.com.   When SNOW renders it on the Portal, the link comes up as unsafe:sip:address@company.com and therefore does not work.   Any ideas on how to solve this?

1 ACCEPTED SOLUTION
21 REPLIES 21

I just responded to your comment on ServicePortal.io, but in short:


Did you modify the Regular Expression to include the CISCOTEL prefix? The above solution modifies the "whitelist", but does not disable sanitization, so you'll need to modify the script to include any prefixes that you're using within the portal.


https://serviceportal.io/avoid-unsafe-prefix-links/#comment-16264


Hi Nathan,


Yes, I have included the prefix as below


angular.module('sn.$sp').config(['$compileProvider',function( $compileProvider ){
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|skype|CISCOTEL):/) ;
}])


Hi Nathan,



Any updates on the unsafe link, still I'm facing the issue, I have included the code as mentioned above..


Let me know if any other modification i need to make here.



Regards,


Bhavin


I just tested this, and it worked fine. I added this to the js_includes on the theme, and created a widget that linked to ciscotel (both lowercase and uppercase) and it worked. Please see below:



Screen Shot 2018-01-25 at 11.24.55 AM.png


Screen Shot 2018-01-25 at 11.27.18 AM.png



And in the browser, I now no longer get the "unsafe" prefix.


find_real_file.png


Hi Nathan,



I have configured the code in my personal dev and works fine for me as mentioned by you.


But in my client instance, I'm still facing the same issue. Is there anything I should validate.