diff --git a/pathologic.module b/pathologic.module
index 017c622..e575b32 100644
--- a/pathologic.module
+++ b/pathologic.module
@@ -132,6 +132,12 @@ function _pathologic_replace($matches) {
   // latter is the least offensive, I think.
   $settings = drupal_static('_pathologic_filter');
   // Now parse the URL
+  // Check first for scheme-less URL
+  if (strpos($matches[2], '//') === 0) {
+    // add the current scheme
+    $scheme = isset($_SERVER['HTTPS']) ? 'https:' : 'http:';
+    $matches[2] = $scheme . $matches[2];
+  }
   $parts = parse_url($matches[2]);
   // Do some early tests to see if we should just give up now.
   if (