From 8b209587a3fbd6d3a8fb6af0ff699819795f90aa Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Fri, 4 Dec 2009 17:57:33 +0000 Subject: #650758 by carlos8f: Fixed Overlay bug: admin links aren't transformed to overlay paths in IE/Opera. --- modules/overlay/overlay-parent.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js index d0dae0a4e..df0f2f4ea 100644 --- a/modules/overlay/overlay-parent.js +++ b/modules/overlay/overlay-parent.js @@ -563,7 +563,12 @@ Drupal.overlay.isAdminLink = function (url) { var self = this; // Create a native Link object, so we can use its object methods. var link = $(url.link(url)).get(0); - var path = link.pathname.replace(new RegExp(Drupal.settings.basePath), ''); + var path = link.pathname; + // Ensure a leading slash on the path, omitted in some browsers. + if (path.substr(0, 1) != '/') { + path = '/' + path; + } + path = path.replace(new RegExp(Drupal.settings.basePath), ''); if (path == '') { // If the path appears empty, it might mean the path is represented in the // query string (clean URLs are not used). -- cgit v1.2.3