]> git.wh0rd.org - tt-rss.git/blobdiff - functions.php
add unit tests for fix_url() and fix a bug I discovered because of them - protocols...
[tt-rss.git] / functions.php
index 715d29deef6dd36c57f560d37497aa0aeed1ee37..e73c0d16e277efaf29788ac4e0ef7914e93bafee 100644 (file)
 
                //prepend slash if the URL has no slash in it
                // "http://www.example" -> "http://www.example/"
-               if (strpos($url, '/', 7) === false) {
+               if (strpos($url, '/', strpos($url, ':') + 3) === false) {
                        $url .= '/';
                }
                return $url;