Created
May 28, 2018 06:40
-
-
Save varshavaradarajan/ecc7548413c1a1c68b0a0d7e89aa45ab to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/fixiyi
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mithril/0.2.3/mithril.min.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body><script id="jsbin-javascript"> | |
var HTMLString = | |
"<div>Hi!</div>" + | |
"<script>alert('foo');<\/script>"; | |
const component = { | |
view() { | |
return (m.trust(HTMLString)); | |
} | |
}; | |
m.mount(document.body, component); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var HTMLString = | |
"<div>Hi!</div>" + | |
"<script>alert('foo');<\/script>"; | |
const component = { | |
view() { | |
return (m.trust(HTMLString)); | |
} | |
}; | |
m.mount(document.body, component);</script></body> | |
</html> |
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
var HTMLString = | |
"<div>Hi!</div>" + | |
"<script>alert('foo');</script>"; | |
const component = { | |
view() { | |
return (m.trust(HTMLString)); | |
} | |
}; | |
m.mount(document.body, component); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment