Created
September 23, 2019 14:58
-
-
Save terjanq/7970c37169819b0dc6d033249bb253d6 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
const sanitized = DOMPurify.sanitize(input.value); | |
const html = ` | |
<meta http-equiv=Content-Security-Policy content="script-src https://pastebin.com/how-can-i-escape-this/ 'nonce-xyz' https://securitymb.github.io/xss/1/modules/v20190816/"> | |
<h1>Homepage!</h1> | |
<p>Welcome to my homepage! Here are some info about me:</p> | |
${sanitized} | |
<script nonce=xyz src="./main.js"><\/script> | |
`; | |
iframe.srcdoc=html; | |
len.textContent = location.href.length; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment