mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°4517 - PHP 8.1: Replace htmlentities(***, ENT_QUOTES, 'UTF-8') with utils::EscapeHtml
This commit is contained in:
@@ -53,7 +53,7 @@ class ConsoleSimpleFieldRenderer extends FieldRenderer
|
||||
|
||||
if ($sFieldClass == 'Combodo\\iTop\\Form\\Field\\HiddenField')
|
||||
{
|
||||
$oOutput->AddHtml('<input type="hidden" id="'.$this->oField->GetGlobalId().'" value="' . htmlentities($this->oField->GetCurrentValue(), ENT_QUOTES, 'UTF-8') . '"/>');
|
||||
$oOutput->AddHtml('<input type="hidden" id="'.$this->oField->GetGlobalId().'" value="'.utils::EscapeHtml($this->oField->GetCurrentValue()).'"/>');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -73,11 +73,10 @@ class ConsoleSimpleFieldRenderer extends FieldRenderer
|
||||
$oValue->AddSubBlock(InputUIBlockFactory::MakeForHidden("",$this->oField->GetCurrentValue(),$this->oField->GetGlobalId()));
|
||||
$oValue->AddSubBlock(new Html($this->oField->GetCurrentValue()));
|
||||
}
|
||||
else
|
||||
{
|
||||
$oField = UIContentBlockUIBlockFactory::MakeStandard("",["field_input_zone", "field_input_datetime", "ibo-input-field-wrapper", "ibo-input-datetime-wrapper"]);
|
||||
else {
|
||||
$oField = UIContentBlockUIBlockFactory::MakeStandard("", ["field_input_zone", "field_input_datetime", "ibo-input-field-wrapper", "ibo-input-datetime-wrapper"]);
|
||||
$oValue->AddSubBlock($oField);
|
||||
$oField->AddSubBlock(new Html('<input class="date-pick ibo-input ibo-input-date" type="text" placeholder="'.htmlentities($sPlaceHolder, ENT_QUOTES, 'UTF-8').'" id="'.$this->oField->GetGlobalId().'" value="'.htmlentities($this->oField->GetCurrentValue(), ENT_QUOTES, 'UTF-8').'" autocomplete="off"/>'));
|
||||
$oField->AddSubBlock(new Html('<input class="date-pick ibo-input ibo-input-date" type="text" placeholder="'.utils::EscapeHtml($sPlaceHolder).'" id="'.$this->oField->GetGlobalId().'" value="'.utils::EscapeHtml($this->oField->GetCurrentValue()).'" autocomplete="off"/>'));
|
||||
$oField->AddSubBlock(new Html('<span class="form_validation"></span>'));
|
||||
}
|
||||
$oBlock->AddSubBlock($oValue);
|
||||
|
||||
Reference in New Issue
Block a user