problem with urlencode and ampersand

Discussion in 'ASP General' started by debk, Oct 8, 2004.

  1. debk

    debk Guest

    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.
     
    debk, Oct 8, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    4
    Views:
    10,310
    mikeb
    Jan 22, 2004
  2. Prasanna Padmanabhan
    Replies:
    1
    Views:
    650
    Kevin Spencer
    Jul 8, 2004
  3. Dario Sala
    Replies:
    1
    Views:
    3,810
    Karl Seguin
    Nov 15, 2004
  4. Rodusa

    Ampersand problem

    Rodusa, Feb 8, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,398
    Rodusa
    Feb 9, 2005
  5. Kiran Makam
    Replies:
    4
    Views:
    204
    Kiran Makam
    Aug 26, 2008
Loading...

Share This Page