merge svn:22520 from trunk to 2.5

bug:2896
thumbnail title fix (use $comment parameter + no double htmlspecialchars)

git-svn-id: http://piwigo.org/svn/branches/2.5@22634 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
flop25 2013-05-13 16:21:41 +00:00
parent 435de95646
commit 4c95c8e6b5

View file

@ -583,10 +583,10 @@ function get_thumbnail_title($info, $title, $comment)
$title.= ' ('.implode(', ', $details).')';
}
if (!empty($info['comment']))
if (!empty($comment))
{
$info['comment'] = htmlspecialchars(strip_tags(trigger_event('render_element_description', $info['comment'])));
$title.= ' '.substr($info['comment'], 0, 100).(strlen($info['comment']) > 100 ? '...' : '');
$comment = strip_tags($comment);
$title.= ' '.substr($comment, 0, 100).(strlen($comment) > 100 ? '...' : '');
}
$title = htmlspecialchars(strip_tags($title));