Url::normalize() shouldn't be prepending anything to empty strings
This commit is contained in:
@@ -502,6 +502,10 @@ class Url {
|
|||||||
// and prepend "http://"
|
// and prepend "http://"
|
||||||
function normalize($sTheUrl)
|
function normalize($sTheUrl)
|
||||||
{
|
{
|
||||||
|
// return if we have an empty string
|
||||||
|
if($sTheUrl == "")
|
||||||
|
return $sTheUrl;
|
||||||
|
|
||||||
// if we already have "://" in the url
|
// if we already have "://" in the url
|
||||||
// we can leave the url alone
|
// we can leave the url alone
|
||||||
if(strpos($sTheUrl, "://") === false)
|
if(strpos($sTheUrl, "://") === false)
|
||||||
|
|||||||
Reference in New Issue
Block a user