diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 70936b9b8..21c31fdf2 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -7351,11 +7351,6 @@ class AttributeImage extends AttributeBlob { if ($value instanceof ormDocument && !$value->IsEmpty()) { - if ($value->GetMimeType() === 'image/svg+xml') { - // N°4360 SVG can contain JavaScript... - return false; - } - return ($value->GetMainMimeType() == 'image'); } diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 08b94c9c4..a8dd3ad59 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -1955,16 +1955,7 @@ abstract class DBObject implements iDisplay } if (!$oAtt->CheckFormat($toCheck)) { - $sErrorMessage = 'Wrong format'; - if ($oAtt instanceof AttributeDBFieldVoid) { - $sErrorMessage .= " [$toCheck]"; - } - if ($oAtt instanceof AttributeBlob) { - /** @var $toCheck \ormDocument */ - $sErrorMessage .= ' ['.$toCheck->GetFileName().']'; - } - - return $sErrorMessage; + return "Wrong format [$toCheck]"; } } else