diff options
author | David Rothstein <drothstein@gmail.com> | 2015-10-21 15:47:40 -0400 |
---|---|---|
committer | David Rothstein <drothstein@gmail.com> | 2015-10-21 15:47:40 -0400 |
commit | 9f72251c9291b5613acb9ca4ea7a51b4739e3f93 (patch) | |
tree | 4e4bc7a16ff3c64f9627fb160e2647d41ab7efd3 /modules | |
parent | 9d16792580c241b42e6192b480f65cf0bdd07bc9 (diff) | |
download | brdo-9f72251c9291b5613acb9ca4ea7a51b4739e3f93.tar.gz brdo-9f72251c9291b5613acb9ca4ea7a51b4739e3f93.tar.bz2 |
Drupal 7.41
Diffstat (limited to 'modules')
-rw-r--r-- | modules/overlay/overlay-parent.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/overlay/overlay-parent.js b/modules/overlay/overlay-parent.js index 7859821b4..efb26370c 100644 --- a/modules/overlay/overlay-parent.js +++ b/modules/overlay/overlay-parent.js @@ -350,7 +350,7 @@ Drupal.overlay.setFocusBefore = function ($element, document) { * TRUE if the URL represents an administrative link, FALSE otherwise. */ Drupal.overlay.isAdminLink = function (url) { - if (Drupal.overlay.isExternalLink(url)) { + if (!Drupal.urlIsLocal(url)) { return false; } @@ -378,6 +378,8 @@ Drupal.overlay.isAdminLink = function (url) { /** * Determine whether a link is external to the site. * + * Deprecated. Use Drupal.urlIsLocal() instead. + * * @param url * The URL to be tested. * @@ -385,8 +387,7 @@ Drupal.overlay.isAdminLink = function (url) { * TRUE if the URL is external to the site, FALSE otherwise. */ Drupal.overlay.isExternalLink = function (url) { - var re = RegExp('^((f|ht)tps?:)?//(?!' + window.location.host + ')'); - return re.test(url); + return !Drupal.urlIsLocal(url); }; /** @@ -405,7 +406,7 @@ Drupal.overlay.isExternalLink = function (url) { */ Drupal.overlay.getInternalUrl = function (path) { var url = Drupal.settings.basePath + path; - if (!this.isExternalLink(url)) { + if (Drupal.urlIsLocal(url)) { return url; } }; |