aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Url.class.php
diff options
context:
space:
mode:
authornicofrand <nicofrand@gmail.com>2013-08-24 11:10:07 +0200
committernicofrand <nicofrand@gmail.com>2013-08-24 11:10:07 +0200
commit7374ff30ef78e125ff433133f11575c5ca85d59a (patch)
treea467a54981c51d7352c644dd8114bd17e56ec661 /inc/poche/Url.class.php
parent38b418b7d63783fa0c7b920b7de6a1f6930fc7cb (diff)
downloadwallabag-7374ff30ef78e125ff433133f11575c5ca85d59a.tar.gz
wallabag-7374ff30ef78e125ff433133f11575c5ca85d59a.tar.zst
wallabag-7374ff30ef78e125ff433133f11575c5ca85d59a.zip
Add IPv4 url support (and others beginning by a digit)
Diffstat (limited to 'inc/poche/Url.class.php')
-rw-r--r--inc/poche/Url.class.php4
1 files changed, 2 insertions, 2 deletions
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
27 27
28 public function isCorrect() 28 public function isCorrect()
29 { 29 {
30 $pattern = '|^(.*:)//([a-z\-.]+)(:[0-9]+)?(.*)$|i'; 30 $pattern = '|^(.*:)//([a-z\-.\d]+)(:[0-9]+)?(.*)$|i';
31 31
32 return preg_match($pattern, $this->url); 32 return preg_match($pattern, $this->url);
33 } 33 }
@@ -73,7 +73,7 @@ class Url
73 if (preg_replace('/\s+/', '', $body->value) !== "<body></body>") { 73 if (preg_replace('/\s+/', '', $body->value) !== "<body></body>") {
74 $html = $tidy->value; 74 $html = $tidy->value;
75 } 75 }
76 } 76 }
77 77
78 $parameters = array(); 78 $parameters = array();
79 if (isset($html) and strlen($html) > 0) 79 if (isset($html) and strlen($html) > 0)