HTML evacuation in Java Play Framework Scala Template

Using the Scala template within the framework of the Java Play 2.0 platform, I want to output dynamic content encoded in HTML.

For instance:

<script type="text/javascript">
    $("#@field.getId()").fieldList({
        data: "@myUnencodedData"
    })
</script>

Are there any built-in methods for this?

+5
source share
1 answer

By default, HTML is hidden for security reasons. To display HTML, you wind up in his assistant Html: @Html(myUnencodedData).

+16
source

All Articles