Prevent PlayFramework's template engine from escaping my Strings
playframework-2.1, scala, templates
Solution
Since version `2.2.0-M1` there appeared a new approach in the docs that explains how to add custom formats to the template engine. This allows me to easily integrate my utilities.
Custom Template Format: Java, Scala
Problem
I've created some utilities that help me at generating HTML and I reference them in my views as `@div( "class" -> "well" ){ Hello Well. }`. Until now those classes were subclassing `NodeSeq` because they aren't escaped then. But I need to get rid off the `NodeSeq` in the top of my class hierarchy because Scala's xml is flawed and makes my code hacky and because I could switch to Traits then. So I tried to find out how to prevent Play from escaping my `Tag`-objects. But unfortunately the only valid solution that I found is to override the template compiler and have the user specify my compiler in his `Build.scala` settings. But I hopefully have overlooked a way more simple approach?