diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js
index 7859821..3f581bb 100644
--- a/modules/overlay/overlay-parent.js
+++ b/modules/overlay/overlay-parent.js
@@ -229,7 +229,7 @@ Drupal.overlay.destroy = function () {
  */
 Drupal.overlay.redirect = function (url) {
   // Create a native Link object, so we can use its object methods.
-  var link = $(url.link(url)).get(0);
+  var link = this.getAnchor(url);
 
   // If the link is already open, force the hashchange event to simulate reload.
   if (window.location.href == link.href) {
@@ -862,10 +862,7 @@ Drupal.overlay.resetActiveClass = function(activePath) {
  *   The Drupal path.
  */
 Drupal.overlay.getPath = function (link, ignorePathFromQueryString) {
-  if (typeof link == 'string') {
-    // Create a native Link object, so we can use its object methods.
-    link = $(link.link(link)).get(0);
-  }
+  link = this.getAnchor(link);
 
   var path = link.pathname;
   // Ensure a leading slash on the path, omitted in some browsers.
@@ -886,6 +883,24 @@ Drupal.overlay.getPath = function (link, ignorePathFromQueryString) {
 };
 
 /**
+ * Helper function which produces an HTMLLinkElement out of a string.
+ *
+ * @param link
+ *   The URL to make into a HTMLLinkElement or a HTMLLinkElement which
+ *   will just be passed through.
+ *
+ * @return
+ *   The anchor as a HTMLLinkElement.
+ * @see http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109/html.html#ID-35143001
+ */
+Drupal.overlay.getAnchor = function (url) {
+  if (typeof url == 'string') {
+    return $('<a />', {href: url}).text(url).get(0);
+  }
+  return url;
+}
+
+/**
  * Get the total displacement of given region.
  *
  * @param region
