Skip to content

Commit c3bdcc9

Browse files
authored
Merge pull request #8068 from kenjis/update-laminas-escaper-2.13
chore: update laminas-escaper to ^2.13
2 parents 26bc784 + c7f9572 commit c3bdcc9

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

admin/framework/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"ext-intl": "*",
1515
"ext-json": "*",
1616
"ext-mbstring": "*",
17-
"laminas/laminas-escaper": "^2.9",
17+
"laminas/laminas-escaper": "^2.13",
1818
"psr/log": "^2.0"
1919
},
2020
"require-dev": {

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"ext-intl": "*",
1515
"ext-json": "*",
1616
"ext-mbstring": "*",
17-
"laminas/laminas-escaper": "^2.9",
17+
"laminas/laminas-escaper": "^2.13",
1818
"psr/log": "^2.0"
1919
},
2020
"require-dev": {

system/ThirdParty/Escaper/Escaper.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,21 @@ public function __construct(?string $encoding = null)
157157
$this->htmlSpecialCharsFlags = ENT_QUOTES | ENT_SUBSTITUTE;
158158

159159
// set matcher callbacks
160-
$this->htmlAttrMatcher = [$this, 'htmlAttrMatcher'];
161-
$this->jsMatcher = [$this, 'jsMatcher'];
162-
$this->cssMatcher = [$this, 'cssMatcher'];
160+
$this->htmlAttrMatcher =
161+
/** @param array<array-key, string> $matches */
162+
function (array $matches): string {
163+
return $this->htmlAttrMatcher($matches);
164+
};
165+
$this->jsMatcher =
166+
/** @param array<array-key, string> $matches */
167+
function (array $matches): string {
168+
return $this->jsMatcher($matches);
169+
};
170+
$this->cssMatcher =
171+
/** @param array<array-key, string> $matches */
172+
function (array $matches): string {
173+
return $this->cssMatcher($matches);
174+
};
163175
}
164176

165177
/**

0 commit comments

Comments
 (0)