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.
我正在尝试用 . List 有三项,其中一项是 json 数据。当 gsp 页面被渲染时,这就是 html 中的内容:
<option a":"aa11","b":"bb33","cc":"cc44"}"="" value="{">label </option>
这是 Grails 2.0.4 中的错误吗?
您应该转义 HTML 字符optionKey
optionKey
例子 :
<g:select optionKey="id" optionKey="${{it.toString().encodeAsHTML()}}" name="book.title" from="${bookList}" />