diff options
Diffstat (limited to 'inc/poche')
-rw-r--r-- | inc/poche/Url.class.php | 6 |
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) |