Freemarker converts < to &lt;

So I have this issue where there is a variable {item.item} This item.item contains a string like ‘abc < 5’. this < is getting converted into &_lt; while the template runs in browser. I tried to work with escape with no luck. What finally worked for me is using a code snippet like below:

<#assign x = “${item.item}” />

This is returning the string correctly, but I am struggling to accept this as a solution. Any inputs ?

Source: cross-browser

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.