String EncodeAmpersand and DecodeAmpersand Example

The String EncodeAmpersand and DecodeAmpersand perform a single encoding and decoding of the ampersand character.

Smartsite SXML CopyCode image Copy Code
<!-- please note that the result on the client is always decoded one more time-->

{string.encodeampersand('&')} => &amp;
{string.encodeampersand('&amp;')} => &amp;amp;

{string.decodeampersand('&amp;amp;')} => &amp;
{string.decodeampersand('&amp;')} => &
Example Result CopyCode image Copy Code
<!-- please note that the result on the client is always decoded one more time-->

& => &
&amp; => &amp;

& => &
& => &
SXML