mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-27 11:22:17 -05:00
fix bug #175 IP addresses do not appear in view original
This commit is contained in:
parent
27574abf46
commit
d7c2f0cc47
@ -216,13 +216,7 @@ class Tools
|
||||
|
||||
public static function getDomain($url)
|
||||
{
|
||||
$pieces = parse_url($url);
|
||||
$domain = isset($pieces['host']) ? $pieces['host'] : '';
|
||||
if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\-]{1,63}\.[a-z\.]{2,6})$/i', $domain, $regs)) {
|
||||
return $regs['domain'];
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return parse_url($url, PHP_URL_HOST);
|
||||
}
|
||||
|
||||
public static function getReadingTime($text) {
|
||||
|
Loading…
Reference in New Issue
Block a user