Expand my Community achievements bar.

SOLVED

How to use escapeXml in sightly

Avatar

Level 7

Hi Team,

While printing the data which got from rich text editor widget using sightly, it is displaying HTML tags as well. Please let me know how can I display the the data without HTML tags  without disturbing the final format of the entered HTML.

E.g:

Input Data: <b>Bold</b> Output: Bold but not Bold or <b>Bold</b>

 

Thanks,

AryA.

1 Accepted Solution

Avatar

Correct answer by
Level 8

You need to set the context when outputting.

<span>${properties.text @ context='html'}</span>

http://docs.adobe.com/docs/en/aem/6-1/develop/sightly/expression-language.html#Display Context

View solution in original post

1 Reply

Avatar

Correct answer by
Level 8

You need to set the context when outputting.

<span>${properties.text @ context='html'}</span>

http://docs.adobe.com/docs/en/aem/6-1/develop/sightly/expression-language.html#Display Context