Commit 8c806a8f authored by catch's avatar catch
Browse files

Issue #1431076 by nod_: Fixed Overlay does not work with prefixed URL paths .

parent f3da649b
......@@ -354,7 +354,7 @@ Drupal.overlay.isAdminLink = function (url) {
// Turn the list of administrative paths into a regular expression.
if (!this.adminPathRegExp) {
var regExpPrefix = '^' + Drupal.settings.pathPrefix + '(';
var regExpPrefix = '' + Drupal.settings.pathPrefix + '(';
var adminPaths = regExpPrefix + Drupal.settings.overlay.paths.admin.replace(/\s+/g, ')$|' + regExpPrefix) + ')$';
var nonAdminPaths = regExpPrefix + Drupal.settings.overlay.paths.non_admin.replace(/\s+/g, ')$|'+ regExpPrefix) + ')$';
adminPaths = adminPaths.replace(/\*/g, '.*');
......@@ -554,7 +554,7 @@ Drupal.overlay.eventhandlerOverrideLink = function (event) {
var target = $target[0];
var href = target.href;
// Only handle links that have an href attribute and use the http(s) protocol.
if (href != undefined && href != '' && target.protocol.match(/^https?\:/)) {
if (typeof href !== 'undefined' && href !== '' && (/^https?\:/).test(target.protocol)) {
var anchor = href.replace(target.ownerDocument.location.href, '');
// Skip anchor links.
if (anchor.length == 0 || anchor.charAt(0) == '#') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment