1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

add unit tests for fix_url() and fix a bug I discovered because of them - protocols longer than "http" broke url fixing

This commit is contained in:
Christian Weiske
2010-11-10 22:18:41 +01:00
committed by Andrew Dolgov
parent 8a7f576735
commit 444537736b
2 changed files with 62 additions and 1 deletions

View File

@@ -6622,7 +6622,7 @@
//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;