diff --git a/system/Helpers/html_helper.php b/system/Helpers/html_helper.php
index 8fd4231dc9..0f7e154a02 100755
--- a/system/Helpers/html_helper.php
+++ b/system/Helpers/html_helper.php
@@ -66,7 +66,14 @@ if (! function_exists('_list')) {
foreach ($list as $key => $val) {
$out .= str_repeat(' ', $depth + 2) . '
';
- $out .= ! is_array($val) ? $val : $key . "\n" . _list($type, $val, '', $depth + 4) . str_repeat(' ', $depth + 2);
+ if (! is_array($val)) {
+ $out .= $val;
+ } else {
+ $out .= $key
+ . "\n"
+ . _list($type, $val, '', $depth + 4)
+ . str_repeat(' ', $depth + 2);
+ }
$out .= "\n";
}
@@ -102,7 +109,11 @@ if (! function_exists('img')) {
// Check for a relative URI
if (! preg_match('#^([a-z]+:)?//#i', $src['src']) && strpos($src['src'], 'data:') !== 0) {
- $img .= $indexPage === true ? ' src="' . site_url($src['src']) . '"' : ' src="' . slash_item('baseURL') . $src['src'] . '"';
+ if ($indexPage === true) {
+ $img .= ' src="' . site_url($src['src']) . '"';
+ } else {
+ $img .= ' src="' . slash_item('baseURL') . $src['src'] . '"';
+ }
unset($src['src']);
}
@@ -192,7 +203,11 @@ if (! function_exists('script_tag')) {
foreach ($src as $k => $v) {
if ($k === 'src' && ! preg_match('#^([a-z]+:)?//#i', $v)) {
- $script .= $indexPage === true ? 'src="' . site_url($v) . '" ' : 'src="' . slash_item('baseURL') . $v . '" ';
+ if ($indexPage === true) {
+ $script .= 'src="' . site_url($v) . '" ';
+ } else {
+ $script .= 'src="' . slash_item('baseURL') . $v . '" ';
+ }
} else {
// for attributes without values, like async or defer, use NULL.
$script .= $k . (null === $v ? ' ' : '="' . $v . '" ');
@@ -280,7 +295,13 @@ if (! function_exists('video')) {
$video = '