游戏框架1.2.将原始HTML插入模板? [英] playframework 1.2. insert raw html into template?

查看:80
本文介绍了游戏框架1.2.将原始HTML插入模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设模板仅包含一个变量:

Assume the template consists of only one variable:

$ {htmlString}

${htmlString}

和相应的控制器:

render("<div>some html markup</div>");

结果是我得到了一个转义的字符串,但是想要获得原始的html.有什么办法吗?

As a result i get an escaped string, but want to get the original html. Is there any way to do this?

推荐答案

我认为您可以使用$ {mystring.raw()}. 或将其嵌入#{verbatim}标记内. -morten

You can use ${mystring.raw()} i think. Or embed it inside a #{verbatim} tag. -morten

这篇关于游戏框架1.2.将原始HTML插入模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆