diff options
Diffstat (limited to 'modules/overlay/overlay-parent.js')
-rw-r--r-- | modules/overlay/overlay-parent.js | 7 |
1 files changed, 6 insertions, 1 deletions
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). |