Skip to content

Commit 53592ac

Browse files
committed
Merge pull request #2 from zhsj/fix-xss
Escape HTML
2 parents 8446876 + 3cf2ee8 commit 53592ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap-markdown-editor.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@
369369
html += '</div>'; // .btn-toolbar
370370
html += '</div>'; // .md-toolbar
371371

372-
html += '<div class="md-editor">' + $.trim(content) + '</div>';
372+
html += '<div class="md-editor">' + $('<div>').text($.trim(content)).html() + '</div>';
373373
html += '<div class="md-preview" style="display:none"></div>';
374374

375375
return html;

0 commit comments

Comments
 (0)