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.
A type safe template engine based on Scala Play comes with Twirl, a powerful Scala-based template engine, whose design was inspired by ASP.NET Razor. Specifically it is: compact, expressive, and fluid: it minimizes the number of characters and keystrokes required in a file, and enables a fast, fluid coding workflow.
Play Framework is an open-source web application framework which follows the model–view–controller (MVC) architectural pattern. It is written in Scala and usable from other programming languages that are compiled to JVM bytecode, e.g. Java.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With