mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Add IPv4 url support (and others beginning by a digit)
This commit is contained in:
parent
38b418b7d6
commit
7374ff30ef
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ class Url
|
||||||
|
|
||||||
public function isCorrect()
|
public function isCorrect()
|
||||||
{
|
{
|
||||||
$pattern = '|^(.*:)//([a-z\-.]+)(:[0-9]+)?(.*)$|i';
|
$pattern = '|^(.*:)//([a-z\-.\d]+)(:[0-9]+)?(.*)$|i';
|
||||||
|
|
||||||
return preg_match($pattern, $this->url);
|
return preg_match($pattern, $this->url);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ class Url
|
||||||
if (preg_replace('/\s+/', '', $body->value) !== "<body></body>") {
|
if (preg_replace('/\s+/', '', $body->value) !== "<body></body>") {
|
||||||
$html = $tidy->value;
|
$html = $tidy->value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
if (isset($html) and strlen($html) > 0)
|
if (isset($html) and strlen($html) > 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue