What's the best JavaScript URL decode utility? Encoding would be nice too and working well with jQuery is an added bonus.
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I've used encodeURIComponent() and decodeURIComponent() too. |
|||||||||||||||||
|
Here is a complete function (taken from PHPJS):
|
|||||||||||||||||||||
|
you can get passed parameters by using this bit of code:
|
|||
|
|
||||
|
Use this
I'm not a great JS programmer, tried all, and this worked awesome! |
|||||
|
Url Decoder Plugin for jQuery - http://urldecoderonline.com/ |
|||
|
If you are responsible for encoding the data in PHP using urlencode, PHP's rawurlencode works with JavaScript's decodeURIComponent without needing to replace the + character. |
|||
|
encodeURIComponent
anddecodeURIComponent
? – Gumbo Nov 27 '10 at 17:31