URl Decode For JavaScript


/ Published in: JavaScript
Save to your folder(s)

I found some cases where JavaScript won't properly handle the Plus symbol (+)


Copy this code and paste it in your HTML
  1. function urldecode(str) {
  2. return decodeURIComponent((str+'').replace(/\+/g, '%20'));
  3. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.