AEM 6.1 | Escape special chars in Sightly

Avatar

Avatar

CQ_learner

Avatar

CQ_learner

CQ_learner

30-06-2016

Hi All,

I want to escape chars like "<", ">" and "/" in sightly. I have this piece of code:

${"{1}{0}{2}{1}{3}{0}{2}" @ format=[properties.test,'<','>','/']} - but its rendering in HTML as &lt;test-data&gt;&lt;/contact-us&gt;

I checked this  https://docs.adobe.com/docs/en/aem/6-0/develop/sightly/expression-language.html  but could not solve the issue.

So How do I achieve this in Sightly? I bascially need a html tag - <test></test> , where "test" will be from dialog.

 

Thanks!!

View Entire Topic

Avatar

Avatar

CQ_learner

Avatar

CQ_learner

CQ_learner

30-06-2016

HI Kautak,

Thanks For your reply, I went through the document it was helpful indeed, but I am not able to quite achieve what i wanted to, Can you please tell me the syntax for the above mentioned requirement.

Thanks!!