grails / grails-core

The Grails Web Application Framework
http://grails.org
Apache License 2.0
2.79k stars 949 forks source link

Could I get the raw html from render tag? #9333

Closed kasonyang closed 9 years ago

kasonyang commented 9 years ago

I am trying to render another template(_b) in current template(a). the template a.gsp:

<g:render template="b" />

the template _b.gsp

<something>

the result is

&lt;something&gt;

but what I want is

<something>

Is there any solution?

dovydasvenckus commented 9 years ago

What version of grails you are using?

For getting raw value you can try this.

${render(template: 'b')}

Or maybe

${raw(render(template: 'b'))}
kasonyang commented 9 years ago

Grails3.0.6. It seems that is a problem of the version.It is ok when I switch to version 3.0.8