Showing
2 changed files
with
8 additions
and
0 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 | + if (stripos($url, 'http://')) { | ||
946 | return '//' . ltrim(strtr($url, array('http://' => '', 'https://' => '')), '//'); | 947 | return '//' . ltrim(strtr($url, array('http://' => '', 'https://' => '')), '//'); |
947 | } | 948 | } |
949 | + | ||
950 | + return $url; | ||
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 | + if (stripos($url, 'http://')) { | ||
1101 | return '//' . ltrim(strtr($url, array('http://' => '', 'https://' => '')), '//'); | 1102 | return '//' . ltrim(strtr($url, array('http://' => '', 'https://' => '')), '//'); |
1102 | } | 1103 | } |
1104 | + | ||
1105 | + return $url; | ||
1106 | + } | ||
1103 | } | 1107 | } |
-
Please register or login to post a comment