aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornicosomb <nicolas@loeuillet.org>2013-04-08 15:32:44 +0200
committernicosomb <nicolas@loeuillet.org>2013-04-08 15:32:44 +0200
commit6c732e1cc64ec9747ca89bd705a9009fe1035a09 (patch)
treea6d34ce3317a943fd845ed40d7d2783be7be612c
parent5a862b0827acc12637c67c69232e861302cb7046 (diff)
downloadwallabag-6c732e1cc64ec9747ca89bd705a9009fe1035a09.tar.gz
wallabag-6c732e1cc64ec9747ca89bd705a9009fe1035a09.tar.zst
wallabag-6c732e1cc64ec9747ca89bd705a9009fe1035a09.zip
suppression de utm_source dans l'url #6
-rwxr-xr-xindex.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/index.php b/index.php
index df00a4d0..27ef5755 100755
--- a/index.php
+++ b/index.php
@@ -34,6 +34,13 @@ switch ($action)
34 continue; 34 continue;
35 35
36 $url = html_entity_decode(trim($url)); 36 $url = html_entity_decode(trim($url));
37
38 // We remove the annoying parameters added by FeedBurner and GoogleFeedProxy (?utm_source=...)
39 // from shaarli, by sebsauvage
40 $i=strpos($url,'&utm_source='); if ($i!==false) $url=substr($url,0,$i);
41 $i=strpos($url,'?utm_source='); if ($i!==false) $url=substr($url,0,$i);
42 $i=strpos($url,'#xtor=RSS-'); if ($i!==false) $url=substr($url,0,$i);
43
37 $title = $url; 44 $title = $url;
38 if (!preg_match('!^https?://!i', $url)) 45 if (!preg_match('!^https?://!i', $url))
39 $url = 'http://' . $url; 46 $url = 'http://' . $url;