@ character is not displayed in Watson Conversation Service response string

Viewed 2349

In working with IBM Watson Conversation Service (WCS) I want to print an email address in the response. The problem is that WCS is neglecting all the characters after @ symbol and the @ character itself.

I tried using ' and \ to escape it, but it didn't help much.

How can I print an email address in a response string?

4 Answers

This is the same problem. I had faced it. and the solution is very pretty simple.

if you are using watson assistant UI try in response like,

youremail\@gmail.com

it will work, if you are using watson assistant API to manipulate the dialog. you have to give

"youremail\\@gmail.com"

I don't know the reason for that. but, the solution seems to work.

If you need to write a static email address, you might have to hack it. It seems like WCS assumes you know what you're doing if you add a (dummy) variable in the response.

ex: Email addr@gmail.com!

results in: Email addr! (text)

but: Email addr@gmail.com! <? $x >

results in: Email addr@gmail.com! (link)

the former is just the literal 'addr'

the latter is the link: (addr@gmail.com) < a href="mailto:addr@gmail.com" class="WAC__Link WAC__Link-email" target="_blank" rel="noopener noreferrer" > addr@gmail.com < / a >

Related