problem with urlencode and ampersand

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • debk

    problem with urlencode and ampersand

    Server.UrlEncod e 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="GroupD etails.asp?grou pName=<%=Server .URLEncode(objR ecordset("Group _Name"))%>">Gro up
    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.
Working...