Skip to content

Commit

Permalink
Merge pull request #235 from mathiasbynens/patch-2
Browse files Browse the repository at this point in the history
Use `insertText` instead of `insertHTML`
  • Loading branch information
LeaVerou committed Nov 6, 2013
2 parents 6a2bce3 + f93700d commit d1127b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ var _ = window.Editor = function(pre) {

var pasted = evt.clipboardData.getData("text/plain");

document.execCommand("insertHTML", false, pasted.replace(/</g, '&lt;'));
document.execCommand("insertText", false, pasted);

that.undoManager.action({
add: pasted,
Expand Down Expand Up @@ -640,4 +640,4 @@ _.actions = {
}
}

})();
})();

0 comments on commit d1127b4

Please sign in to comment.