【发布时间】:2023-12-22 09:53:01
【问题描述】:
在 Freemarker 模板中,我们可以使用转义指令自动对包含块内的所有插值应用转义:
<#escape x as x?html>
<#-- name is escaped as html -->
Hallo, ${name}
</#escape>
有没有办法以编程方式实现类似的效果,定义应用于模板中所有插值的默认转义,包括那些外部转义指令?
谢谢。
【问题讨论】:
标签: java xss escaping freemarker