From: Pascal Corpet Date: Sun, 28 Oct 2007 20:05:53 +0000 (+0100) Subject: Set an alt in icon when there is a title X-Git-Tag: xorg/0.9.16~249 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5d9d45a8e223225ea5c25b857cd5e11f1aabf6f7;p=platal.git Set an alt in icon when there is a title --- 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 "?>