diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Markup/Renderer/Html/Img.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Markup/Renderer/Html/Img.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,84 @@ +hasAttribute('alt')) { + $alt = $token->getAttribute('alt'); + } else { + // try to get the alternative from the URL + $alt = rtrim($text, '/'); + $alt = strrchr($alt, '/'); + if (false !== strpos($alt, '.')) { + $alt = substr($alt, 1, strpos($alt, '.') - 1); + } + } + + // run the URI and alt through htmlentities + $uri = htmlentities($uri, ENT_QUOTES, Zend_Markup_Renderer_Html::getEncoding()); + $alt = htmlentities($alt, ENT_QUOTES, Zend_Markup_Renderer_Html::getEncoding()); + + + return "\"{$alt}\"""; + } + +}