diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js
index 29a9790..ba836eb 100644
--- a/core/modules/overlay/overlay-child.js
+++ b/core/modules/overlay/overlay-child.js
@@ -116,7 +116,7 @@ Drupal.overlayChild.behaviors.parseForms = function (context, settings) {
     // Obtain the action attribute of the form.
     var action = $(this).attr('action');
     // Keep internal forms in the overlay.
-    if (action == undefined || (action.indexOf('http') != 0 && action.indexOf('https') != 0)) {
+    if (action == undefined || !Drupal.overlay.isExternalLink(action)) {
       action += (action.indexOf('?') > -1 ? '&' : '?') + 'render=overlay';
       $(this).attr('action', action);
     }
