grails2.3.x在gsp显示html

修改config.groovy中的

grails {

    views {

        gsp {

            encoding = 'UTF-8'

            htmlcodec = 'xml' // use xml escaping instead of HTML4 escaping

            codecs {

                expression = 'none' // escapes values inside ${},默认是html

                scriptlet = 'html' // escapes output from scriptlets in GSPs

                taglib = 'none' // escapes output from taglibs

                staticparts = 'none' // escapes output from static template parts

            }

        }

        // escapes all not-encoded output at final stage of outputting

        // filteringCodecForContentType.'text/html' = 'html'

    }

}

转载于:https://my.oschina.net/nly/blog/358164

你可能感兴趣的:(grails2.3.x在gsp显示html)