aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-24 22:36:26 -0700
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-24 22:36:26 -0700
commit83954e711d7f79173db00ad7160f6d1d6a3a9c5d (patch)
treefba0652485cb9f6d1820a14b28cdff3a0a705f9f /inc
parent38b418b7d63783fa0c7b920b7de6a1f6930fc7cb (diff)
parent149df445d6a13317bf0777e042230ff3386243a8 (diff)
downloadwallabag-83954e711d7f79173db00ad7160f6d1d6a3a9c5d.tar.gz
wallabag-83954e711d7f79173db00ad7160f6d1d6a3a9c5d.tar.zst
wallabag-83954e711d7f79173db00ad7160f6d1d6a3a9c5d.zip
Merge pull request #174 from nicofrand/dev
Add support for URLS with digits
Diffstat (limited to 'inc')
-rw-r--r--inc/poche/Url.class.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/inc/poche/Url.class.php b/inc/poche/Url.class.php
index 3c74fb43..d7ee911f 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\-.]+)(:[0-9]+)?(.*)$|i'; 30 return filter_var($this->url, FILTER_VALIDATE_URL) !== FALSE;
31
32 return preg_match($pattern, $this->url);
33 } 31 }
34 32
35 public function clean() 33 public function clean()
@@ -73,7 +71,7 @@ class Url
73 if (preg_replace('/\s+/', '', $body->value) !== "<body></body>") { 71 if (preg_replace('/\s+/', '', $body->value) !== "<body></body>") {
74 $html = $tidy->value; 72 $html = $tidy->value;
75 } 73 }
76 } 74 }
77 75
78 $parameters = array(); 76 $parameters = array();
79 if (isset($html) and strlen($html) > 0) 77 if (isset($html) and strlen($html) > 0)