Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Grails 中遇到了元属性被双重转义的问题,例如: <meta name="title" content="${'bla bla "bla"'.encodeAsHTML()}" /> 正在成为: <meta name="title" content="bla bla &quot;bla&quot;"> 显然删除 encodeAsHTML() 会停止双重转义,但这很奇怪,因为没有其他任何东西自动转义,而且我不确定还有什么可能被自动转义。
<meta name="title" content="${'bla bla "bla"'.encodeAsHTML()}" />
<meta name="title" content="bla bla &quot;bla&quot;">
事实证明meta,标签title的body属性.encodeAsHTML()在SiteMeshTagLib.groovy.
meta
title
body
.encodeAsHTML()
SiteMeshTagLib.groovy
这真的应该记录在某个地方,因为我找不到任何提及它并认为它可能是一个错误。