如何逃避"@"在播放框架模板中? [英] How to escape the "@" in play framework templates?
本文介绍了如何逃避"@"在播放框架模板中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在游戏框架模板(视图和标签)中转义@?如果您在播放框架的任何视图中添加"@",模板处理器将自动对其进行处理.即使是电子邮件地址或Twitter帐户.
How to escape the @ in play framework templates (view and tags)? If you add a "@" in any view in play framework it will be automatically processed by the template processor. Even if is an email address or a twitter account.
推荐答案
只需重复 @ ,例如作为 @@ :MyTestView.scala.html
Just repeat the @ for example as @@: MyTestView.scala.html
@()
<html>
<body>
Follow me at @@myTwitter
</body>
</html>
有关信息,请访问 http://www.playframework.com/documentation/2.0/ScalaTemplates
这篇关于如何逃避"@"在播放框架模板中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文