Fix SpringUrl Velocity macro URI encoding
Prior to this commit, the springUrl Velocity macro would only prepend
the context to the given URL; this means that the
ServletHttpResponse.encodeUri method is not called and neither the
ResourceUrlProvider.
This commit changes this macro to use RequestContext.getContextUrl which
prepends the context and encodes the URI.
Issue: SPR-14027
Cherry-picked from 0a56667093
This commit is contained in:
parent
b88c39955b
commit
f76b38c506
|
@ -55,7 +55,7 @@
|
||||||
* Takes a relative URL and makes it absolute from the server root by
|
* Takes a relative URL and makes it absolute from the server root by
|
||||||
* adding the context root for the web application.
|
* adding the context root for the web application.
|
||||||
*#
|
*#
|
||||||
#macro( springUrl $relativeUrl )$springMacroRequestContext.getContextPath()${relativeUrl}#end
|
#macro( springUrl $relativeUrl )$springMacroRequestContext.getContextUrl(${relativeUrl})#end
|
||||||
|
|
||||||
#**
|
#**
|
||||||
* springBind
|
* springBind
|
||||||
|
|
Loading…
Reference in New Issue