Skip navigation
Currently Being Moderated

cflocation dropping characters

Jul 3, 2012 7:11 AM

Tags: #cflocation

Specifically it's dropping the ampersand "&" and all characters after this.

 

I  have a simple search form that sends the search item to an action page where depending on what variables are sent it either processes the form or sends the variable in the url to another page to get processed.

 

The form sends the variables correctly to the processing page. Using cfdump I see I'm getting the correct search item. Then I use cflocation to send the search item to a different page for processing but at this point on the third page the variable is missing anything behind the ampersand. "A&B" becomes "A"

 

My processing page looks like this.

<cfif IsDefined("form.how") and #form.how# eq "any">

     <cfset theitem = #trim(form.item)#>

<cflocation url="search.cfm?item=#theitem#" addtoken="no">

</cfif>

 

I receive "A&B" on this processing page but on the search.cfm page when dumping out the url variable I receive "A" and everything beyond and including the & is stripped.

 

I've tried setting the item variable as a session variable on the processing page but that didn't work either. I've tried using a meta refresh tag but got the same results. I've googled and do not see anything on this.

 

The "&" sign should be a valid character to search for in the database.

 

Any suggestions? thanks



 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points