diff options
author | Derek Allard <derek.allard@ellislab.com> | 2010-07-05 14:11:33 +0200 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2010-07-05 14:11:33 +0200 |
commit | a0905f33eabec71e411c837967750e15d6febf19 (patch) | |
tree | 842bf73caab243bb51fd4d3169026fe9bd1b6988 /system | |
parent | 7770fde8733eff7024191bd8782a30ab0d1f7619 (diff) |
img() will now generate an empty string as an alt attribute if one is not provided.
Diffstat (limited to 'system')
-rw-r--r-- | system/helpers/html_helper.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php index 4afa678a3..cd7b4ce6b 100644 --- a/system/helpers/html_helper.php +++ b/system/helpers/html_helper.php @@ -199,6 +199,12 @@ if ( ! function_exists('img')) $src = array('src' => $src); } + // If there is no alt attribute defined, set it to an empty string + if ( ! isset($src['alt'])) + { + $src['alt'] = ''; + } + $img = '<img'; foreach ($src as $k=>$v) |