From 444537736be8625a5f2ba15de6c284d91666c011 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 10 Nov 2010 22:18:41 +0100 Subject: add unit tests for fix_url() and fix a bug I discovered because of them - protocols longer than "http" broke url fixing --- functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'functions.php') 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; -- cgit v1.2.3