Created
April 18, 2014 14:17
-
-
Save long-long-float/11046484 to your computer and use it in GitHub Desktop.
rendering self in ejs
This file contains hidden or 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
<script src="ejs.js"></script> | |
<script> | |
var unescapeHTML = function(str){ | |
return str.replace(/</g, '<').replace(/>/g, '>') | |
.replace(/&/g, '&'); | |
}; | |
document.body.innerHTML = new EJS({text: unescapeHTML(document.body.innerHTML)}).render(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment