Created
March 19, 2021 10:58
-
-
Save sn4k3-meyer/422f6b2fe840136eb83fba7852e576c2 to your computer and use it in GitHub Desktop.
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
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/inter.min.css"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/[email protected]/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