Last active
November 28, 2018 13:49
-
-
Save gunyarakun/7d78f8beae0387a79f6b91d70e4d8b76 to your computer and use it in GitHub Desktop.
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> | |
alert('aaa'); | |
</script> | |
--> | |
<html> | |
<head> | |
<title>test</title> | |
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
var div = document.createElement('div') | |
div.innerHTML = document.childNodes[0].data; | |
var script = div.getElementsByTagName('script')[0]; | |
eval(script.innerHTML); | |
}, false); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment