Skip to content

Commit

Permalink
bug 2896 - thumbnail title fix (use $comment parameter + no double ht…
Browse files Browse the repository at this point in the history
…mlspecialchars)

git-svn-id: http://piwigo.org/svn/trunk@22520 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed May 7, 2013
1 parent 1da1924 commit f6bcdf4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/functions_html.inc.php
Expand Up @@ -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));
Expand Down

0 comments on commit f6bcdf4

Please sign in to comment.