diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2010-11-10 22:18:41 +0100 |
|---|---|---|
| committer | Andrew Dolgov <fox@madoka.volgo-balt.ru> | 2010-11-11 09:41:51 +0300 |
| commit | 444537736be8625a5f2ba15de6c284d91666c011 (patch) | |
| tree | fcffd5b700d3b30493fe8d7d5cb778e094b28e60 /functions.php | |
| parent | 8a7f5767350382531fb5124c09bb33537a5730d2 (diff) | |
add unit tests for fix_url() and fix a bug I discovered because of them - protocols longer than "http" broke url fixing
Diffstat (limited to 'functions.php')
| -rw-r--r-- | functions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/functions.php b/functions.php index 715d29dee..e73c0d16e 100644 --- a/functions.php +++ b/functions.php @@ -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; |