aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--index.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/index.php b/index.php
index 890eb581..a8326a2b 100644
--- a/index.php
+++ b/index.php
@@ -1642,10 +1642,13 @@ function renderPage()
1642 { 1642 {
1643 $url=$_GET['post']; 1643 $url=$_GET['post'];
1644 1644
1645 // We remove the annoying parameters added by FeedBurner and GoogleFeedProxy (?utm_source=...) 1645
1646 $i=strpos($url,'&utm_source='); if ($i!==false) $url=substr($url,0,$i); 1646 // We remove the annoying parameters added by FeedBurner, GoogleFeedProxy, Facebook...
1647 $i=strpos($url,'?utm_source='); if ($i!==false) $url=substr($url,0,$i); 1647 $annoyingpatterns = array('/[\?&]utm_source=[^&]*/', '/[\?&]utm_campaign=[^&]*/', '/[\?&]utm_medium=[^&]*/', '/#xtor=RSS-[^&]*/', '/[\?&]fb_[^&]*/', '/[\?&]__scoop[^&]*/', '/#tk\.rss_all\?/', '/[\?&]action_ref_map=[^&]*/', '/[\?&]action_type_map=[^&]*/', '/[\?&]action_object_map=[^&]*/');
1648 $i=strpos($url,'#xtor=RSS-'); if ($i!==false) $url=substr($url,0,$i); 1648 foreach($annoyingpatterns as $pattern)
1649 {
1650 $url = preg_replace($pattern, "", $url);
1651 }
1649 1652
1650 $link_is_new = false; 1653 $link_is_new = false;
1651 $link = $LINKSDB->getLinkFromUrl($url); // Check if URL is not already in database (in this case, we will edit the existing link) 1654 $link = $LINKSDB->getLinkFromUrl($url); // Check if URL is not already in database (in this case, we will edit the existing link)