From: nodiscc Date: Thu, 5 Mar 2015 12:40:43 +0000 (+0100) Subject: Improve URL cleaning: X-Git-Tag: v0.0.44beta~15^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=refs%2Fpull%2F141%2Fhead;p=github%2Fshaarli%2FShaarli.git Improve URL cleaning: * also remove action_type_map, action_ref_map and action_object maps params used by facebook --- diff --git a/index.php b/index.php index 0b507b45..bc4fa1e4 100644 --- a/index.php +++ b/index.php @@ -1644,7 +1644,7 @@ 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\?/'); + $annoyingpatterns = array('/[\?&]utm_source=[^&]*/', '/[\?&]utm_campaign=[^&]*/', '/[\?&]utm_medium=[^&]*/', '/#xtor=RSS-[^&]*/', '/[\?&]fb_[^&]*/', '/[\?&]__scoop[^&]*/', '/#tk\.rss_all\?/', '/[\?&]action_ref_map=[^&]*/', '/[\?&]action_type_map=[^&]*/', '/[\?&]action_object_map=[^&]*/'); foreach($annoyingpatterns as $pattern) { $url = preg_replace($pattern, "", $url);