Skip to content

Instantly share code, notes, and snippets.

@morrisonlevi
Last active August 29, 2015 14:15
Show Gist options
  • Save morrisonlevi/353c8dd91bbe7092bfea to your computer and use it in GitHub Desktop.
Save morrisonlevi/353c8dd91bbe7092bfea to your computer and use it in GitHub Desktop.
let id = "trying to be nasty\"></p><script>alert('hello');<p";
// no injection possible! Context-aware escaping!
let fragment = <<<HTMLFragment
<p id="``id``"></p>
<<<HTMLFragment;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment