append the string "&lang=fr"
I like to append the string "&lang=fr" to the variable path.
<cfset newpath = path & "&lang=fr">
<cfoutput>#newpath#</cfoutput>
The output is
index.cfm<=fr
but not the desired output
index.cfm&lang=fr
I like to append the string "&lang=fr" to the variable path.
<cfset newpath = path & "&lang=fr">
<cfoutput>#newpath#</cfoutput>
The output is
index.cfm<=fr
but not the desired output
index.cfm&lang=fr
There is a very good chance that the output IS "index.cfm&lang=fr", but your browser is choosing to not display it that way.
View the page source to confirm this.
Short strings like that that start with an ampersand symbol (&) are often interpeted as a character encoding by browsers.
You can also force the browser to display the string in the desired manner with the htmlEditFormat() or htmlCodeFormat() functions. Which, somewhat interestingly, will encode the special characters such as the ampersand.
I.E.
<cfoutput>#htmlEditFormat(newPath)#</cfoutput>
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.