Skip to content

Commit

Permalink
Merge commit from fork
Browse files Browse the repository at this point in the history
Keep potential xss from being executed
  • Loading branch information
matthieu-rolland authored Jan 22, 2025
2 parents 4437793 + 581a77b commit d60f9a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ps_contactinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,15 @@ public function renderWidget($hookName = null, array $configuration = [])
public function getWidgetVariables($hookName = null, array $configuration = [])
{
$address = $this->context->shop->getAddress();
$formattedAddress = AddressFormat::generateAddress($address, [], '<br />');

$is_state_multilang = !empty(State::$definition['multilang']);
$state_name = (new State($address->id_state))->name;

$contact_infos = [
'company' => Configuration::get('PS_SHOP_NAME'),
'address' => [
'formatted' => AddressFormat::generateAddress($address, [], '<br />'),
'formatted' => Validate::isCleanHtml($formattedAddress) ? $formattedAddress : '',
'address1' => $address->address1,
'address2' => $address->address2,
'postcode' => $address->postcode,
Expand Down

0 comments on commit d60f9a5

Please # to comment.