aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--index.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/index.php b/index.php
index cc3d7360..0b507b45 100644
--- a/index.php
+++ b/index.php
@@ -1642,11 +1642,12 @@ function renderPage()
1642 { 1642 {
1643 $url=$_GET['post']; 1643 $url=$_GET['post'];
1644 1644
1645
1645 // We remove the annoying parameters added by FeedBurner, GoogleFeedProxy, Facebook... 1646 // We remove the annoying parameters added by FeedBurner, GoogleFeedProxy, Facebook...
1646 $annoyingpatterns = array('&utm_source=', '?utm_source=', '#xtor=RSS-', '?fb_', '?__scoop', '#tk.rss_all?', '?utm_campaign=', '?utm_medium='); 1647 $annoyingpatterns = array('/[\?&]utm_source=[^&]*/', '/[\?&]utm_campaign=[^&]*/', '/[\?&]utm_medium=[^&]*/', '/#xtor=RSS-[^&]*/', '/[\?&]fb_[^&]*/', '/[\?&]__scoop[^&]*/', '/#tk\.rss_all\?/');
1647 foreach($annoyingpatterns as $pattern) 1648 foreach($annoyingpatterns as $pattern)
1648 { 1649 {
1649 $i=strpos($url,$pattern); if ($i!==false) $url=substr($url,0,$i); 1650 $url = preg_replace($pattern, "", $url);
1650 } 1651 }
1651 1652
1652 $link_is_new = false; 1653 $link_is_new = false;