From a0905f33eabec71e411c837967750e15d6febf19 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 5 Jul 2010 08:11:33 -0400 Subject: img() will now generate an empty string as an alt attribute if one is not provided. --- system/helpers/html_helper.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'system') 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 = '$v) -- cgit v1.2.3-24-g4f1b