split annoyingpatterns list on multpile lines, add new patterns for removal:

* utm_content=
 * fb=
 * xtor=

closes https://github.com/shaarli/Shaarli/issues/136
This commit is contained in:
nodiscc 2015-06-03 15:54:30 +02:00
parent f95d0428f6
commit cbecab7735

View file

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