]> git.joonet.de Git - adminer.git/commitdiff
Support AJAX for database names with special characters
authorJakub Vrana <jakubv@fb.com>
Fri, 17 Feb 2012 23:49:58 +0000 (15:49 -0800)
committerJakub Vrana <jakubv@fb.com>
Fri, 17 Feb 2012 23:49:58 +0000 (15:49 -0800)
adminer/static/functions.js

index fc386b6f2c784124fcbd5d5152406dccff7bc316..0a17550edb5b4a88cd364fc332b02936f680b8b9 100644 (file)
@@ -515,7 +515,7 @@ function bodyClick(event, db, ns) {
        if (/^a$/i.test(el.tagName) && !/:|#|&download=/i.test(el.getAttribute('href')) && /[&?]username=/.test(el.href) && !event.ctrlKey) {
                var match = /&db=([^&]*)/.exec(el.href);
                var match2 = /&ns=([^&]*)/.exec(el.href);
-               return !(db == (match ? match[1] : '') && ns == (match2 ? match2[1] : '') && ajaxSend(el.href));
+               return !(db == (match ? decodeURIComponent(match[1]) : '') && ns == (match2 ? decodeURIComponent(match2[1]) : '') && ajaxSend(el.href));
        }
        if (/^input$/i.test(el.tagName) && /image|submit/.test(el.type)) {
                if (event.ctrlKey) {