Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions system/ThirdParty/Escaper/Escaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down Expand Up @@ -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);
}

Expand Down
Loading