mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-26 03:58:45 +02:00
N°4517 - PHP 8.1: Replace htmlentities(***, ENT_QUOTES, 'UTF-8') with utils::EscapeHtml
This commit is contained in:
@@ -1235,12 +1235,12 @@ class ObjectController extends BrickController
|
||||
$oAttachment->Set('contents', $oDocument);
|
||||
$iAttId = $oAttachment->DBInsert();
|
||||
|
||||
$aData['msg'] = htmlentities($oDocument->GetFileName(), ENT_QUOTES, 'UTF-8');
|
||||
$aData['msg'] = utils::EscapeHtml($oDocument->GetFileName());
|
||||
$aData['icon'] = utils::GetAbsoluteUrlAppRoot().'env-'.utils::GetCurrentEnvironment().'/itop-attachments/icons/icons8-image-file.svg';
|
||||
|
||||
// Checking if the instance has attachments
|
||||
if (class_exists('AttachmentPlugIn')) {
|
||||
$aData['icon'] = utils::GetAbsoluteUrlAppRoot() . AttachmentPlugIn::GetFileIcon($oDocument->GetFileName());
|
||||
$aData['icon'] = utils::GetAbsoluteUrlAppRoot().AttachmentPlugIn::GetFileIcon($oDocument->GetFileName());
|
||||
}
|
||||
|
||||
$aData['att_id'] = $iAttId;
|
||||
|
||||
Reference in New Issue
Block a user