Thymeleaf 页面输出

<title>[[${msg}]]</title> 
[[${map.name}]]  //[[]]写法会html转义 
[(${map.name})]  //[()]写法不会html转义

 

转义:menuItems: '[
{&quot;fjd&quot;:&quot;N01&quot;,&quot;cddm&quot;:&quot;N01&quot;,&quot;children&quot;:[
{&quot;fjd&quot;:&quot;N01&quot;,&quot;cddm&quot;:&quot;N0101&quot;,&quot;children&quot;:[]},
{&quot;fjd&quot;:&quot;N01&quot;,&quot;cddm&quot;:&quot;N0102&quot;,&quot;children&quot;:[]}
]},
{&quot;fjd&quot;:&quot;N02&quot;,&quot;cddm&quot;:&quot;N02&quot;,&quot;children&quot;:[]}]',
未转:menuItems: '[
{"fjd":"N01","cddm":"N01","children":[
{"fjd":"N01","cddm":"N0101","children":[]},
{"fjd":"N01","cddm":"N0102","children":[]}
]},
{"fjd":"N02","cddm":"N02","children":[]}]
'

 

posted @ 2021-08-10 11:36  蓝灵幽  阅读(238)  评论(0)    收藏  举报