diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |