feat: integrate remarks with XSS cleaning
This commit is contained in:
@@ -11,6 +11,7 @@ use App\BusProNet\Model\Room;
|
||||
use App\BusProNet\Model\Service;
|
||||
use App\BusProNet\Model\Surcharge;
|
||||
use App\BusProNet\TypeConversionTrait;
|
||||
use voku\helper\AntiXSS;
|
||||
|
||||
class BookingResponseParser
|
||||
{
|
||||
@@ -118,6 +119,12 @@ class BookingResponseParser
|
||||
$personalData->communication = $communication;
|
||||
}
|
||||
|
||||
if ($xml->bemerkung) {
|
||||
$antiXss = new AntiXSS();
|
||||
$remarks = $antiXss->xss_clean((string) $xml->bemerkung);
|
||||
$personalData->remarks = $remarks;
|
||||
}
|
||||
|
||||
return $personalData;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ class PersonalData
|
||||
public ?string $shoeSize = null;
|
||||
public ?string $weight = null;
|
||||
public ?\DateTimeImmutable $dateOfBirth = null;
|
||||
public ?string $remarks = null;
|
||||
|
||||
#[Assert\Valid()]
|
||||
public ?Address $address = null;
|
||||
@@ -52,6 +53,7 @@ class PersonalData
|
||||
'sonstiges1' => $this->height,
|
||||
'sonstiges2' => $this->weight,
|
||||
'sonstiges3' => $this->shoeSize,
|
||||
'bemerkung' => $this->remarks,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user