From: nicofrand Date: Sat, 24 Aug 2013 09:10:07 +0000 (+0200) Subject: Add IPv4 url support (and others beginning by a digit) X-Git-Tag: 1.0-beta4~14^2~2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=7374ff30ef78e125ff433133f11575c5ca85d59a;p=github%2Fwallabag%2Fwallabag.git Add IPv4 url support (and others beginning by a digit) --- diff --git a/inc/poche/Url.class.php b/inc/poche/Url.class.php index 3c74fb43..b73f3a46 100644 --- a/inc/poche/Url.class.php +++ b/inc/poche/Url.class.php @@ -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) !== "") { $html = $tidy->value; } - } + } $parameters = array(); if (isset($html) and strlen($html) > 0)