XML === Scala allow writing literal XML. Xitrum uses this feature as its "template engine": * Scala checks XML syntax at compile time: Views are typesafe. * Scala automatically escapes XML: Views are `XSS `_-free by default. Below are some tips. Unescape XML ------------ Use ``scala.xml.Unparsed``: :: import scala.xml.Unparsed Or use ````: :: ```` will be hidden in the output: :: Group XML elements ------------------ :: ```` will be hidden in the output, for example when the use has logged in: :: Render XHTML ------------ Xitrum renders views and layouts as XHTML automatically. If you want to render it yourself (rarely), pay attention to the code below. :: import scala.xml.Xhtml val br =
br.toString // =>

, some browsers will render this as 2
s Xhtml.toXhtml(
) // => "
"