Created
April 18, 2019 17:37
-
-
Save wraithgar/ffe8efadd0ca7caac212aa014edff16d to your computer and use it in GitHub Desktop.
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
const clean = 'bullshit'; | |
let dirty = ''; | |
for (const letter of clean) { | |
const hex = letter.charCodeAt().toString(16); | |
dirty = dirty + unescape(`%uDB40%uDD${hex}`); | |
} | |
console.log(`Clean: ${clean}`); | |
console.log(`Dirty: ${dirty}`); | |
console.log(`Stripped: ${unescape(escape(dirty).replace(/u.{8}/g,''))}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment