Permalink
Browse files

bug 2896 - thumbnail title fix (use $comment parameter + no double ht…

…mlspecialchars)

git-svn-id: http://piwigo.org/svn/trunk@22520 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information...
modus75 committed May 7, 2013
1 parent 1da1924 commit f6bcdf433553e4b95be92b91e270a75571254abd
Showing with 3 additions and 3 deletions.
  1. +3 −3 include/functions_html.inc.php
@@ -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));

0 comments on commit f6bcdf4

Please sign in to comment.