summaryrefslogtreecommitdiff
path: root/modules/overlay/overlay-parent.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/overlay/overlay-parent.js')
-rw-r--r--modules/overlay/overlay-parent.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index 1cb4f0392..098d336da 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -796,8 +796,12 @@ Drupal.overlay.fragmentizeLink = function (link) {
var destination = path + link.search + link.hash;
// Assemble the overlay-ready link.
- var base = window.location.href;
- return $.param.fragment(base, {'overlay':destination});
+ var newLink = $.param.fragment(window.location.href, { overlay: destination });
+ // $.param.fragment() escaped slashes in the overlay part: unescape them.
+ var regexp = new RegExp("[#&]overlay=" + encodeURIComponent(path));
+ newLink = newLink.replace(regexp, decodeURIComponent);
+
+ return newLink;
};
/**