diff options
Diffstat (limited to 'lib/rdoc/generator/template/darkfish/js/search.js')
-rw-r--r-- | lib/rdoc/generator/template/darkfish/js/search.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rdoc/generator/template/darkfish/js/search.js b/lib/rdoc/generator/template/darkfish/js/search.js index b558ca5b4f..d3cded1d57 100644 --- a/lib/rdoc/generator/template/darkfish/js/search.js +++ b/lib/rdoc/generator/template/darkfish/js/search.js @@ -15,9 +15,9 @@ Search.prototype = Object.assign({}, Navigation, new function() { this.init = function() { var _this = this; var observer = function(e) { - switch(e.keyCode) { - case 38: // Event.KEY_UP - case 40: // Event.KEY_DOWN + switch(e.key) { + case 'ArrowUp': + case 'ArrowDown': return; } _this.search(_this.input.value); @@ -101,7 +101,7 @@ Search.prototype = Object.assign({}, Navigation, new function() { } this.escapeHTML = function(html) { - return html.replace(/[&<>]/g, function(c) { + return html.replace(/[&<>"`']/g, function(c) { return '&#' + c.charCodeAt(0) + ';'; }); } |