Skip to content

Commit 0ee6ade

Browse files
authored
chore: bump to laminas-escaper v2.16 (codeigniter4#9458)
1 parent a348792 commit 0ee6ade

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

system/ThirdParty/Escaper/Escaper.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
namespace Laminas\Escaper;
66

7+
use function assert;
78
use function bin2hex;
89
use function ctype_digit;
910
use function hexdec;
1011
use function htmlspecialchars;
1112
use function in_array;
13+
use function is_string;
1214
use function mb_convert_encoding;
1315
use function ord;
1416
use function preg_match;
@@ -207,6 +209,8 @@ public function escapeHtmlAttr(string $string)
207209
}
208210

209211
$result = preg_replace_callback('/[^a-z0-9,\.\-_]/iSu', $this->htmlAttrMatcher, $string);
212+
assert(is_string($result));
213+
210214
return $this->fromUtf8($result);
211215
}
212216

@@ -229,6 +233,8 @@ public function escapeJs(string $string)
229233
}
230234

231235
$result = preg_replace_callback('/[^a-z0-9,\._]/iSu', $this->jsMatcher, $string);
236+
assert(is_string($result));
237+
232238
return $this->fromUtf8($result);
233239
}
234240

@@ -258,6 +264,8 @@ public function escapeCss(string $string)
258264
}
259265

260266
$result = preg_replace_callback('/[^a-z0-9]/iSu', $this->cssMatcher, $string);
267+
assert(is_string($result));
268+
261269
return $this->fromUtf8($result);
262270
}
263271

0 commit comments

Comments
 (0)