New Play Scala Template HTML Escaping

Showing 1-3 of 3 messages
New Play Scala Template HTML Escaping Jay Taylor 6/1/11 10:54 AM
Does the new Play Scala template system escape HTML?  How can I force
escaping or allow raw HTML?

Thanks!
Jay
Re: [play-framework] New Play Scala Template HTML Escaping Guillaume Bort 6/1/11 10:58 AM
Yes any output will be escaped and wrapped in a play.templates.Html type.

So if you want to control the escaping mechanism, just make your
dynamic expression directly return Html:

@Html("<strong>Do not escape</strong>")

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>

--
Guillaume Bort, http://guillaume.bort.fr

Re: New Play Scala Template HTML Escaping Jay Taylor 6/1/11 2:10 PM
This is working as described.  Thanks for the super quick response-

On Jun 1, 10:58 am, Guillaume Bort <guillaume.b...@gmail.com> wrote:
> Yes any output will be escaped and wrapped in a play.templates.Html type.
>
> So if you want to control the escaping mechanism, just make your
> dynamic expression directly return Html:
>
> @Html("<strong>Do not escape</strong>")
>