Skip to content

Instantly share code, notes, and snippets.

@JavaScript-Packer
Created January 17, 2016 18:10
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/54863d7388638074ade8 to your computer and use it in GitHub Desktop.
Save JavaScript-Packer/54863d7388638074ade8 to your computer and use it in GitHub Desktop.
HEX encoding from JavaScript escape function/command. www.whak.ca
<input type="button" value="Hex Escape" onclick="alert(escape('A test!').replace(/%/g,'\\x'));">
<input type="button" value="Hex unEscape" onclick="alert(unescape('A\\x20test\\x21'.replace(/\\x/g,'%')));">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment