2
0
forked from Wavyzz/dolibarr

Fix #huntrd875d1a2-7205-4b2b-93cf-439fa4c4f961

This commit is contained in:
Laurent Destailleur
2023-02-20 13:09:27 +01:00
parent 08e78f77bd
commit 4ebb39febe
4 changed files with 75 additions and 70 deletions

View File

@@ -296,9 +296,13 @@ if ($resql) {
$imageurl = $rssparser->getImageUrl();
$linkrss = $rssparser->getLink();
if (!preg_match('/^http/', $imageurl)) {
$imageurl = $linkrss.$imageurl;
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
if (image_format_supported($imageurl) >= 0) {
// If we are sure imageurl is a path to an image file, and if it does not start with http, we append root url to it.
$imageurl = $linkrss.$imageurl;
}
}
if ($imageurl) {
if ($imageurl && preg_match('/^http', $imageurl)) {
print '<img height="32" src="'.$imageurl.'">';
} else {
print $langs->trans("None");