Resolve self depreciation

This commit is contained in:
Yassine Guedidi
2023-08-10 00:37:25 +01:00
parent 1ce5164e70
commit 8ef6a14652
6 changed files with 22 additions and 7 deletions

View File

@ -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);
}