Reputation: 67
I am playing a little bit with Play 2.0.
Now I have a problem regarding html elements in the message file.
I have the following template extract:
<footer>
@Messages("footer")
</footer>
And in the file conf/messages I have:
footer= Test ®
When the page is displayed, the message is escaped and displayed as
Test & reg;
I do not want the message to be escaped! I want my html element (®) displayed as it is! But it is not working.
How can I provide the string, so that no escaping takes place? I have tried the following to no avail:
footer= Test \®
footer= Test '®'
footer= test '&'reg;
Upvotes: 0
Views: 713
Reputation: 5951
If you have HTML element in your translation strings you should include them as follows in the template:
@Html(Messages("footer"))
Or did I completely misunderstood your question?
Upvotes: 8