0

I'm trying out an Embedded Chat ( https://help.salesforce.com/articleView?id=snapins_chat_overview.htm&type=5 ) on a custom site.

If the client sends the chat-message "This is a link: www.google.com", the out-of-the-box logic for the Emedded-Chat seems to automatically turn www.google.com into an anchor-tag. That's sweet. But the problem is: it then posts a chat message with this tag as stringified/encodd HTML.

screenshot

What could be causing this messed up encoding? Is there a setting in SF that controls encoding?


When inspecting the page, the rendered markup is

<div dir="ltr" data-aura-rendered-by="1935:0" class="uiOutputRichText" data-aura-class="uiOutputRichText">This is a link: &lt;a href='http://www.google.com' target='_blank'&gt;www.google.com&lt;/a&gt;</div>

The markup I would want is the same thing except the encoding:

<div dir="ltr" data-aura-rendered-by="1935:0" class="uiOutputRichText" data-aura-class="uiOutputRichText">This is a link: <a href='http://www.google.com' target='_blank'>www.google.com</a></div>

I can't figure out what could be screwing it up.

1 Answer 1

0

Turns out that the encoding problem was caused by a requireJs script being loaded before the chat-script was loaded. It's listed by SalesForce as a known issue:

https://success.salesforce.com/issues_view?id=a1p3A000000BMJ2QAO&title=special-characters-are-not-rendering-in-snap-in-chat-widget

Removing the requireJs-script resolved the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .