diff options
author | nicosomb <nicolas@loeuillet.org> | 2013-04-08 15:32:44 +0200 |
---|---|---|
committer | nicosomb <nicolas@loeuillet.org> | 2013-04-08 15:32:44 +0200 |
commit | 6c732e1cc64ec9747ca89bd705a9009fe1035a09 (patch) | |
tree | a6d34ce3317a943fd845ed40d7d2783be7be612c /index.php | |
parent | 5a862b0827acc12637c67c69232e861302cb7046 (diff) | |
download | wallabag-6c732e1cc64ec9747ca89bd705a9009fe1035a09.tar.gz wallabag-6c732e1cc64ec9747ca89bd705a9009fe1035a09.tar.zst wallabag-6c732e1cc64ec9747ca89bd705a9009fe1035a09.zip |
suppression de utm_source dans l'url #6
Diffstat (limited to 'index.php')
-rwxr-xr-x | index.php | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |