forked from wallabag/wallabag
Resolve self depreciation
This commit is contained in:
@ -58,11 +58,19 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface
|
||||
|
||||
public function removeWww($url)
|
||||
{
|
||||
if (!\is_string($url)) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
return preg_replace('/^www\./i', '', $url);
|
||||
}
|
||||
|
||||
public function removeScheme($url)
|
||||
{
|
||||
if (!\is_string($url)) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
return preg_replace('#^https?://#i', '', $url);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user