Add some filters to clean URLs

This commit is contained in:
Alexis J 2015-03-04 18:02:47 +01:00 committed by nodiscc
parent 7572cfbe96
commit bc1ef5b94a

View file

@ -1646,6 +1646,11 @@ function renderPage()
$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);
$i=strpos($url,'?fb_'); if ($i!==false) $url=substr($url,0,$i);
$i=strpos($url,'?__scoop'); if ($i!==false) $url=substr($url,0,$i);
$i=strpos($url,'#tk.rss_all?'); if ($i!==false) $url=substr($url,0,$i);
$i=strpos($url,'?utm_campaign='); if ($i!==false) $url=substr($url,0,$i);
$i=strpos($url,'?utm_medium='); if ($i!==false) $url=substr($url,0,$i);
$link_is_new = false;
$link = $LINKSDB->getLinkFromUrl($url); // Check if URL is not already in database (in this case, we will edit the existing link)