Skip to content

Instantly share code, notes, and snippets.

@JavaScript-Packer
Created April 29, 2015 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JavaScript-Packer/4ca487cc507ee8436b60 to your computer and use it in GitHub Desktop.
Save JavaScript-Packer/4ca487cc507ee8436b60 to your computer and use it in GitHub Desktop.
URL escape/encode all characters
function fullEscape(r){
return r.replace(/./g, function(e){
return "%"+e.charCodeAt(0).toString(16);
});
};
alert(fullEscape("JavaScript Packer"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment