1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-27 11:22:17 -05:00

Add IPv4 url support (and others beginning by a digit)

This commit is contained in:
nicofrand 2013-08-24 16:31:22 +02:00
parent 7374ff30ef
commit 38b95e7be9

View File

@ -27,9 +27,7 @@ class Url
public function isCorrect()
{
$pattern = '|^(.*:)//([a-z\-.\d]+)(:[0-9]+)?(.*)$|i';
return preg_match($pattern, $this->url);
return filter_var($this->url, FILTER_VALIDATE_URL);
}
public function clean()