In play framework we use @Html
in scala views if we do not want play to escape Html characters. Is there any alternate to this in Japid. I tried to import play.api.templates.Html
and tried ${Html
and ${Html.get
but they are not working. Am I doing something wrong.
Japid by default does not escape the string value of expressions to make it html safe, like what Play! does.
Reference: https://github.com/branaway/Japid/blob/master/documentation/manual/Japid_Generic_Engine.textile
In case you need to explicitly escape the string value of expression, you can use:
${escapeHtml(expr)}
Or simply:
~{expr}
~ means escape.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.