From 9fd2880968a346cb472f392883f3af4885c9f6e5 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 17 Feb 2012 15:49:58 -0800 Subject: [PATCH] Support AJAX for database names with special characters --- adminer/static/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/static/functions.js b/adminer/static/functions.js index fc386b6f..0a17550e 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -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) {