How do I change the codec with plugins in Grails 3?
While I realize this is not a "best practice", I have a lot of plugins that I am upgrading to Grails 3 and I need to set their GSP encoding to their old default "none" (because everything is already encoded where it is should be, and we expect the unencoded data to be elsewhere.) Unfortunately this doesn't work in the documentation.
The Grails 3.2.11 docs say:
In plugin encoding
Grails also has the ability to control the codecs used for each plugin. For example, if you have a plugin named foo then placing the following config in your app .groovy will disable encoding for plugin foo only
foo.grails.views.gsp.codecs.expression = "none"
It didn't work using Grails 3.2.11. The encoding is still "html".
Other things I tried didn't help either:
- Just by changing the plugin application.yml with the defaults (it seems like this would be perfect for me and exactly what I expected would control the encoding of the plugin)
- Same line at runtime.groovy
- Same line, in plugin.groovy plugin
- Same concept with prefix both in the application and in the plugin application.yml
- Changes to suggestions How can I exclude a plugin from the default grails gsp encoding?
I quite agree to write this as a Grails bug, but figured I'd ask here first if anyone else resolves this!
Thanks in advance!
source to share