From 6c732e1cc64ec9747ca89bd705a9009fe1035a09 Mon Sep 17 00:00:00 2001 From: nicosomb Date: Mon, 8 Apr 2013 15:32:44 +0200 Subject: [PATCH] suppression de utm_source dans l'url #6 --- index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.php b/index.php index df00a4d08..27ef5755b 100755 --- a/index.php +++ b/index.php @@ -34,6 +34,13 @@ switch ($action) continue; $url = html_entity_decode(trim($url)); + + // We remove the annoying parameters added by FeedBurner and GoogleFeedProxy (?utm_source=...) + // from shaarli, by sebsauvage + $i=strpos($url,'&utm_source='); if ($i!==false) $url=substr($url,0,$i); + $i=strpos($url,'?utm_source='); if ($i!==false) $url=substr($url,0,$i); + $i=strpos($url,'#xtor=RSS-'); if ($i!==false) $url=substr($url,0,$i); + $title = $url; if (!preg_match('!^https?://!i', $url)) $url = 'http://' . $url;