From c5472ef1ae1c787e2a5579a827553fd9e0f2df1b Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Sun, 23 Feb 2025 23:22:44 +0800 Subject: [PATCH] chore: bump to laminas-escaper v2.16 --- system/ThirdParty/Escaper/Escaper.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/system/ThirdParty/Escaper/Escaper.php b/system/ThirdParty/Escaper/Escaper.php index 1e5bc7f9fad9..4fce36bd0c6c 100644 --- a/system/ThirdParty/Escaper/Escaper.php +++ b/system/ThirdParty/Escaper/Escaper.php @@ -4,11 +4,13 @@ namespace Laminas\Escaper; +use function assert; use function bin2hex; use function ctype_digit; use function hexdec; use function htmlspecialchars; use function in_array; +use function is_string; use function mb_convert_encoding; use function ord; use function preg_match; @@ -207,6 +209,8 @@ public function escapeHtmlAttr(string $string) } $result = preg_replace_callback('/[^a-z0-9,\.\-_]/iSu', $this->htmlAttrMatcher, $string); + assert(is_string($result)); + return $this->fromUtf8($result); } @@ -229,6 +233,8 @@ public function escapeJs(string $string) } $result = preg_replace_callback('/[^a-z0-9,\._]/iSu', $this->jsMatcher, $string); + assert(is_string($result)); + return $this->fromUtf8($result); } @@ -258,6 +264,8 @@ public function escapeCss(string $string) } $result = preg_replace_callback('/[^a-z0-9]/iSu', $this->cssMatcher, $string); + assert(is_string($result)); + return $this->fromUtf8($result); }