How to escape the "@" in play framework templates?
Asked Answered
L

1

18

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.

Lazarus answered 12/6, 2013 at 23:37 Comment(0)
L
34

Just repeat the @ for example as @@: MyTestView.scala.html

@()
<html>
   <body>
      Follow me at @@myTwitter
   </body>
</html>

The information can be found at http://www.playframework.com/documentation/2.0/ScalaTemplates

Lazarus answered 12/6, 2013 at 23:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.