]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
split annoyingpatterns list on multpile lines, add new patterns for removal:
authornodiscc <nodiscc@gmail.com>
Wed, 3 Jun 2015 13:54:30 +0000 (15:54 +0200)
committernodiscc <nodiscc@gmail.com>
Wed, 3 Jun 2015 13:58:58 +0000 (15:58 +0200)
 * utm_content=
 * fb=
 * xtor=

closes https://github.com/shaarli/Shaarli/issues/136

index.php

index a547fbe8379c565df906ff0e7643cdde81ec1bf9..9561f63b63a3975b897ab894334dfa1025168f7f 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1664,7 +1664,20 @@ function renderPage()
 
 
         // We remove the annoying parameters added by FeedBurner, GoogleFeedProxy, Facebook...
-        $annoyingpatterns = array('/[\?&]utm_source=[^&]*/', '/[\?&]utm_campaign=[^&]*/', '/[\?&]utm_medium=[^&]*/', '/#xtor=RSS-[^&]*/', '/[\?&]fb_[^&]*/', '/[\?&]__scoop[^&]*/', '/#tk\.rss_all\?/', '/[\?&]action_ref_map=[^&]*/', '/[\?&]action_type_map=[^&]*/', '/[\?&]action_object_map=[^&]*/');
+        $annoyingpatterns = array('/[\?&]utm_source=[^&]*/',
+            '/[\?&]utm_campaign=[^&]*/',
+            '/[\?&]utm_medium=[^&]*/',
+            '/#xtor=RSS-[^&]*/',
+            '/[\?&]fb_[^&]*/',
+            '/[\?&]__scoop[^&]*/',
+            '/#tk\.rss_all\?/',
+            '/[\?&]action_ref_map=[^&]*/',
+            '/[\?&]action_type_map=[^&]*/',
+            '/[\?&]action_object_map=[^&]*/',
+            '/[\?&]utm_content=[^&]*/',
+            '/[\?&]fb=[^&]*/',
+            '/[\?&]xtor=[^&]*/'
+            );
         foreach($annoyingpatterns as $pattern)
         {
             $url = preg_replace($pattern, "", $url);