Skip to content

Commit

Permalink
Fix unicode escape issue in regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
curry684 committed Nov 6, 2023
1 parent c9512a8 commit 2ab060b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validator/Constraints/BannedScripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function getCharacterClass(): string
{
if (!isset($this->characterClass)) {
$this->scripts = array_map(fn (Script|string $v) => is_string($v) ? Script::from($v) : $v, $this->scripts);
$this->characterClass = sprintf('[%s]', implode('', array_map(fn (Script $script) => sprintf('\p{%s}', $script->value), $this->scripts)));
$this->characterClass = sprintf('[%s]', implode('', array_map(fn (Script $script) => sprintf('\\p{%s}', $script->value), $this->scripts)));
}

return $this->characterClass;
Expand Down

0 comments on commit 2ab060b

Please sign in to comment.