This commit is contained in:
Hideaki Tanabe 2020-08-14 21:56:03 +09:00
parent 47e734ff74
commit 5ac9997ed5
4 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,7 @@
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/jquery.autosize-min.js"></script>
<script type="text/javascript" src="js/marked.min.js"></script>
<script type="text/javascript" src="js/purify.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
<title>Markdown Live Preview</title>

View File

@ -9,7 +9,8 @@ $(function() {
let convert = () => {
let html = marked($('#markdown').val());
$('#output').html(html);
let sanitized = DOMPurify.sanitize(html);
$('#output').html(sanitized);
}
$('#markdown').bind('keyup', function() {

3
public/js/purify.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long