Skip to content

Instantly share code, notes, and snippets.

@eligrey
Forked from jed/LICENSE.txt
Last active April 24, 2018 00:32
Show Gist options
  • Save eligrey/1224209 to your computer and use it in GitHub Desktop.
Save eligrey/1224209 to your computer and use it in GitHub Desktop.
use cached DOM elements to escape HTML
new Option(c).innerHTML
new Option(c).innerHTML

Public domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.

{
"name": "escapeHTML",
"keywords": ["escape", "escaping", "HTML", "XSS"]
}
@eligrey
Copy link
Author

eligrey commented Sep 17, 2011

Oh it seems you're right, now that I've actually read the rules. I'll fork the 140byt.es thing and make a new submission.

@jed
Copy link

jed commented Sep 17, 2011

no need, i'll edit mine!

@jed
Copy link

jed commented Sep 17, 2011 via email

@jdalton
Copy link

jdalton commented Sep 19, 2011

This won't work in IE < 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment