Skip to content

Commit

Permalink
Fix tite for images
Browse files Browse the repository at this point in the history
  • Loading branch information
zonky2 committed Oct 2, 2024
1 parent efebd2c commit 06610f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Contao/View/Contao2BackendView/Widget/FileTree.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,13 @@ private function generateGalleryImage(File $file, $info)
$image = $this->placeholderImage;
}

$info = StringUtil::specialchars(\strip_tags($info));
if (strncmp($image, 'data:', 5) === 0) {
return '<img src="' . $file->dataUri . '" width="' . $file->width . '" height="' . $file->height
. '" alt="" class="gimage removable" title="' . StringUtil::specialchars($info) . '">';
. '" alt="" class="gimage removable" title="' . $info . '">';
}

return Image::getHtml($image, '', 'class="gimage removable" title="' . StringUtil::specialchars($info) . '"');
return Image::getHtml($image, '', 'class="gimage removable" title="' . $info . '"');
}

/**
Expand Down

0 comments on commit 06610f0

Please sign in to comment.