Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to unescape html in slightly

Avatar

Level 2

Hello,

Whas is the syntax to unescape html in slightly.

 

Please advise.

Thanks,

Rachana

1 Accepted Solution

Avatar

Correct answer by
Employee

${ yourValue @ context='unsafe'} will unescape.

Avoid using this to not introduce XSS issues.

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

${ yourValue @ context='unsafe'} will unescape.

Avoid using this to not introduce XSS issues.

Avatar

Level 10

Hi There,

Thank you for reaching out to Adobe Community.

Please go through the below link to see if it helps:

http://docs.adobe.com/content/docs/en/aem/6-0/develop/sightly.html

This is the entire documentation for sightly.

thanks!

Avatar

Level 2

What Feike said was correct however by using context='unsafe' you are disabling escaping and XSS protection completely. By using context='html' it filters the HTML to meet the AntiSamy policy rules, removing what doesn't match the rules. By doing this you still have some XSS protection instead of disabling it completely.