Showing
2 changed files
with
10 additions
and
2 deletions
@@ -943,6 +943,10 @@ class Helpers | @@ -943,6 +943,10 @@ class Helpers | ||
943 | */ | 943 | */ |
944 | public static function getUrlSafe($url) | 944 | public static function getUrlSafe($url) |
945 | { | 945 | { |
946 | - return '//' . ltrim(strtr($url, array('http://' => '', 'https://' => '')), '//'); | 946 | + if (stripos($url, 'http://')) { |
947 | + return '//' . ltrim(strtr($url, array('http://' => '', 'https://' => '')), '//'); | ||
948 | + } | ||
949 | + | ||
950 | + return $url; | ||
947 | } | 951 | } |
948 | } | 952 | } |
@@ -1098,6 +1098,10 @@ class Helpers | @@ -1098,6 +1098,10 @@ class Helpers | ||
1098 | */ | 1098 | */ |
1099 | public static function getUrlSafe($url) | 1099 | public static function getUrlSafe($url) |
1100 | { | 1100 | { |
1101 | - return '//' . ltrim(strtr($url, array('http://' => '', 'https://' => '')), '//'); | 1101 | + if (stripos($url, 'http://')) { |
1102 | + return '//' . ltrim(strtr($url, array('http://' => '', 'https://' => '')), '//'); | ||
1103 | + } | ||
1104 | + | ||
1105 | + return $url; | ||
1102 | } | 1106 | } |
1103 | } | 1107 | } |
-
Please register or login to post a comment