Server.HTMLDecode

Discussion in 'ASP General' started by b.Wurm, Jun 7, 2005.

  1. b.Wurm

    b.Wurm Guest

    how can I write a server.htmlDecode function?

    thank you
     
    b.Wurm, Jun 7, 2005
    #1
    1. Advertising

  2. b.Wurm

    Steven Burn Guest

    Function URLDecode(sDec)
    dim objRE
    set objRE = new RegExp
    sDec = Replace(sDec, "+", " ")
    objRE.Pattern = "%([0-9a-fA-F]{2})"
    objRE.Global = True
    URLDecode = objRE.Replace(sDec, GetRef("URLDecodeHex"))
    End Function

    '// Replacement function for the above
    Function URLDecodeHex(sMatch, lhex_digits, lpos, ssource)
    URLDecodeHex = chr("&H" & lhex_digits)
    End Function

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    "b.Wurm" <> wrote in message news:#...
    > how can I write a server.htmlDecode function?
    >
    > thank you
    >
    >
     
    Steven Burn, Jun 7, 2005
    #2
    1. Advertising

  3. b.Wurm

    McKirahan Guest

    McKirahan, Jun 7, 2005
    #3
  4. b.Wurm

    Steven Burn Guest

    My apologies (C&P'd to a local file a while ago, but didn't bookmark the URL I got it from)

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    "McKirahan" <> wrote in message news:...
    > "b.Wurm" <> wrote in message
    > news:#...
    > > how can I write a server.htmlDecode function?
    > >
    > > thank you

    >
    > "Steven Burn" didn't credit the source:
    > http://flangy.com/dev/asp/urldecode.html
    >
    >
     
    Steven Burn, Jun 7, 2005
    #4
    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. Sonu Kapoor
    Replies:
    4
    Views:
    4,760
    Sonu Kapoor
    Oct 28, 2004
  2. aa

    htmldecode problem

    aa, Feb 23, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    553
    Teemu Keiski
    Feb 23, 2005
  3. Jonas Åkermark

    Server.HTMLDecode doesn't decode char 345

    Jonas Åkermark, Aug 2, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    805
    Joerg Jooss
    Aug 2, 2005
  4. Replies:
    12
    Views:
    1,886
  5. Night Air

    Server.HtmlDecode Question

    Night Air, Jan 5, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    577
Loading...

Share This Page