SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    rollin' on dubs
    0 Post(s)
    0 Thread(s)

    javascript equivalent of URLEncode -- not escape()

    Does anyone have a work around in javascript that will produce the same results as the VBScript functions URLEncode() and URLDecode().

    I am aware of the javascript escape() and unescape() functions, however this does not produce the results i am looking for. For example, if I have a quotation mark ("), the javascript escape() will render this as %22 (or something like that) whereas the URLEncode will render this as &-quot; (had to insert the hyphen because i can't fugure out how to get vbulletin to not represent it like this ") I know that I could write a regex for every single character somebody could put in there but i didn't know if anyone else had come across and solved this problem in a different way.

    Last edited by makeda; Oct 15, 2002 at 09:04.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts