Skip to content

Commit fbaf26e

Browse files
gr8manmichalsn
andauthored
Update system/Common.php
Co-authored-by: Michal Sniatala <michal@sniatala.pl>
1 parent 0a28072 commit fbaf26e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/Common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ function esc($data, string $context = 'html', ?string $encoding = null)
479479
$method = $context === 'attr' ? 'escapeHtmlAttr' : 'escape' . ucfirst($context);
480480

481481
static $escapers = [];
482-
$cacheKey = $encoding ?? 'default';
482+
$cacheKey = strtolower($encoding ?? 'utf-8');
483483

484484
if (! isset($escapers[$cacheKey])) {
485485
$escapers[$cacheKey] = new Escaper($encoding);

0 commit comments

Comments
 (0)