Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const sanitized = DOMPurify.sanitize(input.value);
const html = `
<meta http-equiv=Content-Security-Policy content="script-src 'nonce-xyz'">
<p>Welcome to my homepage! Here are some info about me:</p>
<script nonce=xyz src="./main.js"><\/script>
len.textContent = location.href.length;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment