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:
committed by
Andrew Dolgov
parent
8a7f576735
commit
444537736b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user