markdown doesn't allow IM hyperlink in webchat
The hyperlink i am using has following syntax:- await context.PostAsync("Please click on HelpDesk"); But webchat is rendering it as
Please click on HelpDesk
At the same time emulator is picking it up correctly. I had raised a similar issue few days back, but closed by giving a link for markdown syntax. It seems like a bug. I have tried the same in different markdown online editors some produce expected HTML but others not. Attached the screenshot of an online markdown editor with similar behavior.
Does it only occur when the uri scheme is "sip" rather than "http"? I wonder if there is some url validation involved.
yes i think. It works fine with mailto [mailto:[email protected]] as well. As of now problem is with sip and as you said some validation in the webchat window is preventing anchor tag to render properly.
This is being filtered out by Angular's aHrefSanitizationWhitelist - we will look at the sip protocol to see if there are any security risks involved with enabling this. If so, this might need to be a user-configurable option in a future version of the webchat control.
For future reference - it may be as easy as adding
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|file|sip):/);
in the config of app.js
@danmarshall can you please comment further or close?
@Sams4u we have a new open-source version of our webchat control, which should enable this behavior. If you go to your bot's Channel config page for webchat, you can create a new site definition for a webchat and click the "webChat Preview" checkbox to get the new version.
Closing as this has been fixed.