diff options
author | brian978 <dbrian89@yahoo.com> | 2012-12-08 22:02:16 +0100 |
---|---|---|
committer | brian978 <dbrian89@yahoo.com> | 2012-12-08 22:02:16 +0100 |
commit | 9a214e1b31cd2ff2433f8ed8df8585537d358ac7 (patch) | |
tree | 14643a7698d55b3e054c7dc607fc18ee4d0dc26c /system/helpers/url_helper.php | |
parent | 160c7d16c4e0c92c030c0a41d1223f916a82089d (diff) | |
parent | 545a7c86701875e1412bcde316e9bcc76d9a23a0 (diff) |
Merge remote-tracking branch 'upstream/develop' into dev/hex_xss
Diffstat (limited to 'system/helpers/url_helper.php')
-rw-r--r-- | system/helpers/url_helper.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php index 14c216afe..36ff0ff2c 100644 --- a/system/helpers/url_helper.php +++ b/system/helpers/url_helper.php @@ -152,7 +152,7 @@ if ( ! function_exists('anchor')) if ( ! is_array($uri)) { - $site_url = preg_match('!^\w+://! i', $uri) ? $uri : site_url($uri); + $site_url = preg_match('#^(\w+:)?//#i', $uri) ? $uri : site_url($uri); } else { @@ -191,7 +191,7 @@ if ( ! function_exists('anchor_popup')) function anchor_popup($uri = '', $title = '', $attributes = FALSE) { $title = (string) $title; - $site_url = preg_match('!^\w+://! i', $uri) ? $uri : site_url($uri); + $site_url = preg_match('#^(\w+:)?//#i', $uri) ? $uri : site_url($uri); if ($title === '') { @@ -535,7 +535,7 @@ if ( ! function_exists('redirect')) */ function redirect($uri = '', $method = 'auto', $code = NULL) { - if ( ! preg_match('#^https?://#i', $uri)) + if ( ! preg_match('#^(\w+:)?//#i', $uri)) { $uri = site_url($uri); } |