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

git-svn-id: http://piwigo.org/svn/trunk@22520 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices 2013-05-07 04:52:08 +00:00
parent 1da192431b
commit f6bcdf4335

View file

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