]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Add IPv4 url support (and others beginning by a digit) 171/head
authornicofrand <nicofrand@gmail.com>
Sat, 24 Aug 2013 09:10:07 +0000 (11:10 +0200)
committernicofrand <nicofrand@gmail.com>
Sat, 24 Aug 2013 09:10:07 +0000 (11:10 +0200)
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)