diff --git a/lib/codemirror.js b/lib/codemirror.js index f0f8837aed1919977b46e7f7d5a0a2dd11a6ca7f..1fd68dda24a86ccf18b5d100eb6fd3a73be8d573 100644 --- a/lib/codemirror.js +++ b/lib/codemirror.js @@ -3827,7 +3827,9 @@ var reader = new FileReader; reader.onload = operation(cm, function() { - text[i] = reader.result; + var content = reader.result; + if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) content = ""; + text[i] = content; if (++read == n) { pos = clipPos(cm.doc, pos); var change = {from: pos, to: pos,