We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65377b2 commit bb1fe92Copy full SHA for bb1fe92
src/lib/editorFile.js
@@ -1,6 +1,7 @@
1
import Sidebar from "components/sidebar";
2
import tile from "components/tile";
3
import confirm from "dialogs/confirm";
4
+import DOMPurify from "dompurify";
5
import fsOperation from "fileSystem";
6
import startDrag from "handlers/editorFileTab";
7
import tag from "html-tag-js";
@@ -246,7 +247,7 @@ export default class EditorFile {
246
247
});
248
249
if (typeof options.content === "string") {
- content.innerHTML = options.content;
250
+ content.innerHTML = DOMPurify.sanitize(options.content);
251
} else {
252
content.appendChild(options.content);
253
}
0 commit comments