diff options
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/html_helper.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 239f24ccc..d8c3e6d89 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -181,7 +181,7 @@ if ( ! function_exists('img')) foreach ($src as $k => $v) { - if ($k === 'src' && ! preg_match('#^https?://#i', $v)) + if ($k === 'src' && ! preg_match('#^([a-z]+:)?//#i', $v)) { if ($index_page === TRUE) { @@ -273,7 +273,7 @@ if ( ! function_exists('link_tag')) { foreach ($href as $k => $v) { - if ($k === 'href' && strpos($v, '://') === FALSE) + if ($k === 'href' && ! preg_match('#^([a-z]+:)?//#i', $v)) { if ($index_page === TRUE) { @@ -292,7 +292,7 @@ if ( ! function_exists('link_tag')) } else { - if (strpos($href, '://') !== FALSE) + if ( ! preg_match('#^([a-z]+:)?//#i', $href)) { $link .= 'href="'.$href.'" '; } |