Special Characters
Last updated
Was this helpful?
Last updated
Was this helpful?
The Apache Freemarker uses the HTML output format by default. In some cases, special characters placed within the MessageML must be HTML-escaped, otherwise, the request sending the MessageML will receive a 400 error response. The following are examples of valid HTML-escaping:
Character
HTML escaping
Required escaping
messageML example
<
<
Yes
<messageML><</messageML>
&
&
Yes
<messageML>& </messageML>
$
$
Yes The $ character only needs to be escaped if it comes before the { character.
<messageML>${}</messageML>
#
#
Yes The # character only needs to be escaped if it comes before the { character.
<messageML>#{}</messageML>
>
>
No
<messageML>></messageML>
"
"
No
<messageML>"</messageML>
'
'
No
<messageML>'</messageML>
*
*
No
<messageML>*</messageML>
%
%
No
<messageML>%</messageML>
Here after you can find an example of a message sent by a bot and containing these special characters as well as the structure of the messageML sent: