Railo server converts plus (+) to spaces
Question
Weird thing I noticed on my Railo server.
All +
characters I pass in the url are automatically converted to spaces when I cfdump
or cfoutput
them.
Any server setting to change so that a +
will remain a +
?
Solution
Railo is not converting the +
characters to space - your browser is.
(If you run the exact same code on ColdFusion you will get the same behaviour.)
In URLs, +
is a reserved character and needs to be encoded as %2B
, and there are several other characters that require encoding too.
You can use the CFML function UrlEncodedFormat to encode text for use in a URL.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow