问题
Assume the template consists of only one variable:
${htmlString}
and the corresponding Controller:
render("<div>some html markup</div>");
As a result i get an escaped string, but want to get the original html. Is there any way to do this?
回答1:
You can use ${mystring.raw()} i think. Or embed it inside a #{verbatim} tag. -morten
回答2:
In the Play2 template engine the escaping is done like this:
@Html("\n<br>")
(Source)
来源:https://stackoverflow.com/questions/7919256/playframework-1-2-insert-raw-html-into-template