Escape quotation marks when working with accesskeys
authorMichael M Slusarz <slusarz@curecanti.org>
Sun, 21 Nov 2010 07:54:59 +0000 (00:54 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Sun, 21 Nov 2010 17:30:36 +0000 (10:30 -0700)
horde/js/accesskeys.js

index 65d4846..52e0ead 100644 (file)
@@ -15,7 +15,7 @@ var AccessKeys = {
         if ((this.macos && e.ctrlKey) ||
             (!this.macos && e.altKey && !e.ctrlKey)) {
             // Need to search for both upper and lowercase value
-            key = String.fromCharCode(e.keyCode || e.charCode);
+            key = String.fromCharCode(e.keyCode || e.charCode).sub('"', '\\"');;
             elts = $$('[accesskey="' + key.toUpperCase() + '"]');
             if (key.toUpperCase() != key.toLowerCase()) {
                 elts = elts.concat($$('[accesskey="' + key.toLowerCase() + '"]'));