diff --git a/lib/ace/mode/text_highlight_rules.js b/lib/ace/mode/text_highlight_rules.js index fc7bfb67..48e016b0 100644 --- a/lib/ace/mode/text_highlight_rules.js +++ b/lib/ace/mode/text_highlight_rules.js @@ -212,6 +212,11 @@ var TextHighlightRules = function() { for (var i = list.length; i--; ) keywords[list[i]] = className; }); + // in old versions of opera keywords["__proto__"] sets prototype + // even on objects with __proto__=null + if (Object.getPrototypeOf(keywords)) { + keywords.__proto__ = null; + } this.$keywordList = Object.keys(keywords); map = null; return ignoreCase