]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Url.class.php
Add IPv4 url support (and others beginning by a digit)
[github/wallabag/wallabag.git] / inc / poche / Url.class.php
index 3c74fb434bb1b7f14cd0f0934874893c44cb578c..b73f3a465c31ebe1edba0c4033d27e299ab2c596 100644 (file)
@@ -27,7 +27,7 @@ class Url
 
     public function isCorrect()
     {
-        $pattern = '|^(.*:)//([a-z\-.]+)(:[0-9]+)?(.*)$|i';
+        $pattern = '|^(.*:)//([a-z\-.\d]+)(:[0-9]+)?(.*)$|i';
 
         return preg_match($pattern, $this->url);
     }
@@ -73,7 +73,7 @@ class Url
                 if (preg_replace('/\s+/', '', $body->value) !== "<body></body>") {
                     $html = $tidy->value;
                 }
-            } 
+            }
 
             $parameters = array();
             if (isset($html) and strlen($html) > 0)