aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornicofrand <nicofrand@gmail.com>2013-08-24 16:31:22 +0200
committernicofrand <nicofrand@gmail.com>2013-08-24 16:31:22 +0200
commit38b95e7be9ce68a86c50486462bee485419a67a8 (patch)
treed229239008c3da432269d3e51401640aece49bcd
parent7374ff30ef78e125ff433133f11575c5ca85d59a (diff)
downloadwallabag-38b95e7be9ce68a86c50486462bee485419a67a8.tar.gz
wallabag-38b95e7be9ce68a86c50486462bee485419a67a8.tar.zst
wallabag-38b95e7be9ce68a86c50486462bee485419a67a8.zip
Add IPv4 url support (and others beginning by a digit)
-rw-r--r--inc/poche/Url.class.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/inc/poche/Url.class.php b/inc/poche/Url.class.php
index b73f3a46..302700a9 100644
--- a/inc/poche/Url.class.php
+++ b/inc/poche/Url.class.php
@@ -27,9 +27,7 @@ class Url
27 27
28 public function isCorrect() 28 public function isCorrect()
29 { 29 {
30 $pattern = '|^(.*:)//([a-z\-.\d]+)(:[0-9]+)?(.*)$|i'; 30 return filter_var($this->url, FILTER_VALIDATE_URL);
31
32 return preg_match($pattern, $this->url);
33 } 31 }
34 32
35 public function clean() 33 public function clean()