]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Twig/WallabagExtension.php
Changed RSS to Atom feed and improve paging
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Twig / WallabagExtension.php
index 351172c460f2fc24ba76c37e85e76b14ac958c57..530e0492486feae9679350438f09585cd6bcd1a5 100644 (file)
@@ -28,6 +28,7 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
     {
         return [
             new \Twig_SimpleFilter('removeWww', [$this, 'removeWww']),
+            new \Twig_SimpleFilter('removeScheme', [$this, 'removeScheme']),
         ];
     }
 
@@ -45,6 +46,11 @@ class WallabagExtension extends \Twig_Extension implements \Twig_Extension_Globa
         return preg_replace('/^www\./i', '', $url);
     }
 
+    public function removeScheme($url)
+    {
+        return preg_replace('#^https?://#', '', $url);
+    }
+
     /**
      * Return number of entries depending of the type (unread, archive, starred or all).
      *