problem with urlencode and ampersand

D

debk

Server.UrlEncode is not longer converting the ampersand in a string to
%26 so the value passed in the querystring gets truncated in the
following page. Is this a problem with IIS, does anyone know? I can't
find this reported anywhere else. I may just have to code around it.
Details:
link is created by the following code:
<a>href="GroupDetails.asp?groupName=<%=Server.URLEncode(objRecordset("Group_Name"))%>">Group
Details</a>

If Group_Name contains an ampersand, this appears as & in the
querystring instead of being converted by URLEncode to %26. When the
groupName querystring value is used in the new page, it is truncated.
So "A & M AllStars" is truncated to "A".

However, this only occurs in 1 environment, in our dev environment it
works fine and converts ampersand so it doesn't muck up the
querystring. I can't find any obvious setting in IIS which would
affect this, but presumably it must be happening on the server and is
nothing to do with browser, browser version etc. I assume a security
patch has caused this. Any help would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top