diff options
author | nodiscc <nodiscc@gmail.com> | 2015-06-03 15:54:30 +0200 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2015-06-03 15:58:58 +0200 |
commit | cbecab773526b0c39f3cffa1d4595b5caa781bda (patch) | |
tree | 7806c39d63fb0169052c9d2be423400e92a228aa | |
parent | f95d0428f65676969f2e1caf469413c7bf701692 (diff) | |
download | Shaarli-cbecab773526b0c39f3cffa1d4595b5caa781bda.tar.gz Shaarli-cbecab773526b0c39f3cffa1d4595b5caa781bda.tar.zst Shaarli-cbecab773526b0c39f3cffa1d4595b5caa781bda.zip |
split annoyingpatterns list on multpile lines, add new patterns for removal:
* utm_content=
* fb=
* xtor=
closes https://github.com/shaarli/Shaarli/issues/136
-rw-r--r-- | index.php | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -1664,7 +1664,20 @@ function renderPage() | |||
1664 | 1664 | ||
1665 | 1665 | ||
1666 | // We remove the annoying parameters added by FeedBurner, GoogleFeedProxy, Facebook... | 1666 | // We remove the annoying parameters added by FeedBurner, GoogleFeedProxy, Facebook... |
1667 | $annoyingpatterns = array('/[\?&]utm_source=[^&]*/', '/[\?&]utm_campaign=[^&]*/', '/[\?&]utm_medium=[^&]*/', '/#xtor=RSS-[^&]*/', '/[\?&]fb_[^&]*/', '/[\?&]__scoop[^&]*/', '/#tk\.rss_all\?/', '/[\?&]action_ref_map=[^&]*/', '/[\?&]action_type_map=[^&]*/', '/[\?&]action_object_map=[^&]*/'); | 1667 | $annoyingpatterns = array('/[\?&]utm_source=[^&]*/', |
1668 | '/[\?&]utm_campaign=[^&]*/', | ||
1669 | '/[\?&]utm_medium=[^&]*/', | ||
1670 | '/#xtor=RSS-[^&]*/', | ||
1671 | '/[\?&]fb_[^&]*/', | ||
1672 | '/[\?&]__scoop[^&]*/', | ||
1673 | '/#tk\.rss_all\?/', | ||
1674 | '/[\?&]action_ref_map=[^&]*/', | ||
1675 | '/[\?&]action_type_map=[^&]*/', | ||
1676 | '/[\?&]action_object_map=[^&]*/', | ||
1677 | '/[\?&]utm_content=[^&]*/', | ||
1678 | '/[\?&]fb=[^&]*/', | ||
1679 | '/[\?&]xtor=[^&]*/' | ||
1680 | ); | ||
1668 | foreach($annoyingpatterns as $pattern) | 1681 | foreach($annoyingpatterns as $pattern) |
1669 | { | 1682 | { |
1670 | $url = preg_replace($pattern, "", $url); | 1683 | $url = preg_replace($pattern, "", $url); |