diff --git a/admin/framework/composer.json b/admin/framework/composer.json index 44fbb67591c0..20370da43686 100644 --- a/admin/framework/composer.json +++ b/admin/framework/composer.json @@ -14,7 +14,7 @@ "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", - "laminas/laminas-escaper": "^2.9", + "laminas/laminas-escaper": "^2.13", "psr/log": "^2.0" }, "require-dev": { diff --git a/composer.json b/composer.json index 6510a6872599..5fd53c55925f 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", - "laminas/laminas-escaper": "^2.9", + "laminas/laminas-escaper": "^2.13", "psr/log": "^2.0" }, "require-dev": { diff --git a/system/ThirdParty/Escaper/Escaper.php b/system/ThirdParty/Escaper/Escaper.php index d6a02e14c9be..c4964cb55e4a 100644 --- a/system/ThirdParty/Escaper/Escaper.php +++ b/system/ThirdParty/Escaper/Escaper.php @@ -157,9 +157,21 @@ public function __construct(?string $encoding = null) $this->htmlSpecialCharsFlags = ENT_QUOTES | ENT_SUBSTITUTE; // set matcher callbacks - $this->htmlAttrMatcher = [$this, 'htmlAttrMatcher']; - $this->jsMatcher = [$this, 'jsMatcher']; - $this->cssMatcher = [$this, 'cssMatcher']; + $this->htmlAttrMatcher = + /** @param array $matches */ + function (array $matches): string { + return $this->htmlAttrMatcher($matches); + }; + $this->jsMatcher = + /** @param array $matches */ + function (array $matches): string { + return $this->jsMatcher($matches); + }; + $this->cssMatcher = + /** @param array $matches */ + function (array $matches): string { + return $this->cssMatcher($matches); + }; } /**