0
私たちは前に、以下の例のようなものを使用しました。このようにタグを呼び出すgrails.views.default.codec = "html"の動作がgrails 2.0で変更されましたか?
class KontrollController {
def index() {
[ value: "hä öh üh!"]
}
}
:
<pl:myTag value="${value}">${value}</pl:myTag>
Taglibの:_myTag.gsp
でclass PlTagLib {
static namespace = "pl"
def myTag = { attrs, body ->
def m = [:]
log.error body()
m.body = body()
m.value = attrs.value
out << render(template: '/template/myTag', model: m)
}
}
${body} //will display: "hä öh üh!" wrong encoding
${value} // will display correct: "hä öh üh!"
私たちはこれまで何回もボディにこのバージョンを使用していて、正しく機能しました。
誰にでも簡単な解決方法があるのですか?