Skip to content

Instantly share code, notes, and snippets.

@sn4k3-meyer
Created March 19, 2021 10:58
Show Gist options
  • Save sn4k3-meyer/422f6b2fe840136eb83fba7852e576c2 to your computer and use it in GitHub Desktop.
Save sn4k3-meyer/422f6b2fe840136eb83fba7852e576c2 to your computer and use it in GitHub Desktop.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/open-fonts@1.1.1/fonts/inter.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@1.1.2/new.min.css">
<script src=https://cure53.de/purify.js></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<body>
<header><h1>Test Jquery Juntos pelas crianças</h1></header>
<main>
<fieldset>
<legend>Maximiliano Meyer</legend>
<textarea id="textarea" rows="8" cols="48" placeholder="Insert payloads here"></textarea>
</fieldset>
<fieldset>
<legend>Keep Hacking ;)</legend>
<div id=preview>
</div>
</fieldset>
<script>
$('textarea').on('input', ev => {
const text = $(ev.target).val();
const sanitized = DOMPurify.sanitize(text);
document.getElementById('preview').innertHTML = sanitized;
$('#preview').html(sanitized);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment