diff options
Diffstat (limited to 'include/follow.php')
-rw-r--r-- | include/follow.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/follow.php b/include/follow.php index 3c1fcd890..a967386e9 100644 --- a/include/follow.php +++ b/include/follow.php @@ -19,6 +19,9 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $is_red = false; $is_http = ((strpos($url,'://') !== false) ? true : false); + if($is_http && substr($url,-1,1) === '/') + $url = substr($url,0,-1); + if(! allowed_url($url)) { $result['message'] = t('Channel is blocked on this site.'); return $result; @@ -143,7 +146,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) if(! $r) { // attempt network auto-discovery - if(strpos($url,'@')) { + if(strpos($url,'@') && (! $is_http)) { $r = discover_by_webbie($url); } elseif($is_http) { |