So I'm seeing weird issues with the <cflocation...
# lucee
d
So I'm seeing weird issues with the <cflocation /> tag under 5.3.8.206. There are a couple of Jira issues regarding location & encoding. If I have the following code, then the value
x
ends up getting encoded twice:
Copy code
<cflocation url="/index.cfm?#(len(x) ? '&x=' & encodeForUrl(x) : '')#" />
However, if I change the code to:
Copy code
<cfset y = "/index.cfm?#(len(x) ? '&x=' & encodeForUrl(x) : '')#" />
<cflocation url="#y#" />
I get the expected results. It looks like Lucee is sometimes automatically encoding strings in the <cflocation /> tag, but ACF does not do that. What is the expected behavior?
I see the same behavior in 5.3.9.61-SNAPSHOT.
@zackster I'm not finding anything in the docs or dev.lucee.org which indicates what the expected behavior is. From conversations I've seen, it seems like there's some kind of expectation that <cflocation /> encodes strings, but ACF definitely does not do that.