I'm using the CKEditor plugin of Grails and while I can store the HTML content from CKEditor to the database, I can not render it properly in the view.
What I'm getting in the view is the HTML escaped and not as mark-up content.
<p> sdfsdfsadf</p> <p> asdfasdfasdf</p> <p> asdfasdfasdf</p> <p> ¥</p>
When I want:
sdfsdfsadf
asdfasdfasdf
asdfasdfasdf
¥
How do I get the stored data to render properly?
Migrated to Grails 2.4 and after some head scratching, found <%=expression%>
is deprecated.
Using the new syntax ${raw(expression)}
solved my issue.
try ${instance?.attribute?.decodeHTML()}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With