From 5d9d45a8e223225ea5c25b857cd5e11f1aabf6f7 Mon Sep 17 00:00:00 2001 From: Pascal Corpet Date: Sun, 28 Oct 2007 21:05:53 +0100 Subject: [PATCH] Set an alt in icon when there is a title --- plugins/compiler.icon.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/compiler.icon.php b/plugins/compiler.icon.php index 330ac2a..584d35f 100644 --- a/plugins/compiler.icon.php +++ b/plugins/compiler.icon.php @@ -24,8 +24,12 @@ function smarty_compiler_icon($tag_attrs, &$compiler) { extract($compiler->_parse_attrs($tag_attrs)); + $alt = 'alt=""'; + if (isset($title)) { - $title = 'title="'. pl_entities(trim($title, '\'"'), ENT_QUOTES).'" '; + $title = pl_entities(trim($title, '\'"'), ENT_QUOTES); + $alt = 'alt="'.$title.'"'; + $title = 'title="'. $title.'" '; } $name = pl_entities(trim($name, '\'"'), ENT_QUOTES); @@ -35,7 +39,7 @@ function smarty_compiler_icon($tag_attrs, &$compiler) $name = $globals->baseurl . '/' . $name; } - return "?>