return str.replace(/%([0-9A-F]{2})/gi, function(nothing, charCodeStr){
return str.replace(/\+/g, '%20').replace(/%([0-9A-F]{2})/gi, function(nothing, charCodeStr){