How to use escapeXml in sightly | Community
Skip to main content
Dinu_Arya
Level 6
October 16, 2015
Solved

How to use escapeXml in sightly

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
leeaslingAccepted solution
Level 8
October 16, 2015

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

1 reply

leeaslingAccepted solution
Level 8
October 16, 2015

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

Translate