aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorAlexis J <alexis@effingo.be>2015-03-04 18:02:47 +0100
committernodiscc <nodiscc@gmail.com>2015-03-04 20:02:04 +0100
commitbc1ef5b94a711a0db249f1773db9b3ca1da31c6c (patch)
tree2ebf15110671c18813706d0d67ad1d6717996437 /index.php
parent7572cfbe9620b13569ee47337f7015bcad119332 (diff)
downloadShaarli-bc1ef5b94a711a0db249f1773db9b3ca1da31c6c.tar.gz
Shaarli-bc1ef5b94a711a0db249f1773db9b3ca1da31c6c.tar.zst
Shaarli-bc1ef5b94a711a0db249f1773db9b3ca1da31c6c.zip
Add some filters to clean URLs
Diffstat (limited to 'index.php')
-rw-r--r--index.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.php b/index.php
index 99c37652..d7140409 100644
--- a/index.php
+++ b/index.php
@@ -1646,6 +1646,11 @@ function renderPage()
1646 $i=strpos($url,'&utm_source='); if ($i!==false) $url=substr($url,0,$i); 1646 $i=strpos($url,'&utm_source='); if ($i!==false) $url=substr($url,0,$i);
1647 $i=strpos($url,'?utm_source='); if ($i!==false) $url=substr($url,0,$i); 1647 $i=strpos($url,'?utm_source='); if ($i!==false) $url=substr($url,0,$i);
1648 $i=strpos($url,'#xtor=RSS-'); if ($i!==false) $url=substr($url,0,$i); 1648 $i=strpos($url,'#xtor=RSS-'); if ($i!==false) $url=substr($url,0,$i);
1649 $i=strpos($url,'?fb_'); if ($i!==false) $url=substr($url,0,$i);
1650 $i=strpos($url,'?__scoop'); if ($i!==false) $url=substr($url,0,$i);
1651 $i=strpos($url,'#tk.rss_all?'); if ($i!==false) $url=substr($url,0,$i);
1652 $i=strpos($url,'?utm_campaign='); if ($i!==false) $url=substr($url,0,$i);
1653 $i=strpos($url,'?utm_medium='); if ($i!==false) $url=substr($url,0,$i);
1649 1654
1650 $link_is_new = false; 1655 $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) 1656 $link = $LINKSDB->getLinkFromUrl($url); // Check if URL is not already in database (in this case, we will edit the existing link)