Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Dont use CData to store the temp content of a file because its emitte…

…d to the HTML of the IDE and CData keeps the content as is, because there can be code like a closing script tag in there this is rendered as part of the IDE and thus breaking the HTML. Text node seems to do exactly the same here, and does the proper escaping. File restoring still works as expected, the only cost is that it requires more space to store files that haven't been saved before but that's a small offer I think.
  • Loading branch information...
commit 7e739c573d05bdcd7944edafbc0a55b68a38fe94 1 parent 1ebe8a5
@janjongboom janjongboom authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  plugins-client/ext.editors/editors.js
2  plugins-client/ext.editors/editors.js
@@ -954,7 +954,7 @@ module.exports = ext.register("ext/editors/editors", {
//popup a file watch dialog to ask if the user wants to
//load the new file from disk, losing changes.
if (copy.getAttribute("changed") == 1 && copy.getAttribute("newfile") == 1) {
- copy.appendChild(copy.ownerDocument.createCDATASection(
+ copy.appendChild(copy.ownerDocument.createTextNode(
(pages[i].$doc.getValue() || "")
.replace(/\r/g, "\\r")
.replace(/\n/g, "\\n")

0 comments on commit 7e739c5

Please sign in to comment.
Something went wrong with that request. Please try again.