Created
October 30, 2012 13:31
-
-
Save iSWORD/3980204 to your computer and use it in GitHub Desktop.
HTML+JS Mega-min special char escaper
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
<textarea style="display:block" cols=42 rows=10 onkeyup="t=this;t.nextElementSibling.value=t.value.replace(/</g,'&lt;').replace(/>/g,'&gt;')"></textarea> | |
<textarea readonly onclick="t=this;t.focus();t.select();"></textarea> |
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
<textarea style="display:block" cols=42 rows=10 onkeyup="t=this;t.nextElementSibling.value=t.value.replace(/</g,'&lt;').replace(/>/g,'&gt;')"></textarea> | |
<textarea readonly onclick="t=this;t.focus();t.select();"></textarea> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment