Updated Grails from 2.2.0
to 2.2.4
.
Before: http://localhost:8180/sub:favorites
After: http://localhost:8180/sub%3Afavorites
As you can see Grails encodes URL's params by default. How can I disable it and encode it manually?
Updated Grails from 2.2.0
to 2.2.4
.
Before: http://localhost:8180/sub:favorites
After: http://localhost:8180/sub%3Afavorites
As you can see Grails encodes URL's params by default. How can I disable it and encode it manually?
Chances are high that there is an easier way. But if there isn't you can do the following:
Grails registeres a bean named grailsLinkGenerator
. This bean is used for creating links (createLink(..)
or <g:createLink />
) within the the application. I think the default implementation is a CachingLinkGenerator which is a subclass of DefaultLinkGenerator which again implements the interface LinkGenerator.
You could extend one of these classes and override the bean in resources.groovy
:
grailsLinkGenerator(YourLinkGenerator) {
..
}