[[…]]会被转义,[(…)]不会。
假设在后台传入msg的值为
<b>AAA</b>
在前台这样使用
[[${msg}]]___[(${msg})]
则最终的效果会是这样
官方文档
https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#inlining
[[…]]会被转义,[(…)]不会。
假设在后台传入msg的值为
<b>AAA</b>
在前台这样使用
[[${msg}]]___[(${msg})]
则最终的效果会是这样
官方文档
https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#inlining