Created
April 29, 2015 02:50
-
-
Save JavaScript-Packer/4ca487cc507ee8436b60 to your computer and use it in GitHub Desktop.
URL escape/encode all characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode 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