I have a requirement to highlight a part of text based on certain criteria. I am identifying the text to be highlighted in my controller and sending the updated text (along with embedded styles) to the view layer.
I have an object - obj, with obj.text = "Welcome. Hi Dude";
When i use ${obj.Text} in the view layer. The following is displayed as a text...
Welcome. Hi Dude";
Instead...is there way to make the text render as a HTML, meaning just display "Welcome.Hi Dude"?
Note: I am using groovy template
Thanks, Karthik
You need to use the Raw extension:
${obj.text.raw()}
Will produce HTML that is not escaped by the groovy template