Incorrect RegExp parsing in non-unicode mode when an invalid range is supplied. #2103

Closed
opened 4 months ago by Moonchild · 0 comments
Owner

Regressor: No issue - Refactor CharacterRange + Unicode handling into module for maintainability [9a9e4e0c9a]

Resulting bug: invalid ranges from a character class, e.g.

[\w-\.]

will exclude the right-hand character from the resulting regex.
In /u unicode mode this kind of range is an error and throws, but in non-unicode mode the individual non-class characters should be added to the resulting regex (this was a concession made to web devs consistently not understanding - designating a range in the past, and browsers/parsers and the spec being adjusted as a result to deal with PEBCAK).

Regressor: No issue - Refactor CharacterRange + Unicode handling into module for maintainability [9a9e4e0c9a6c182272371be263d6d42edfca90c9] Resulting bug: invalid ranges from a character class, e.g. ``` [\w-\.] ``` will exclude the right-hand character from the resulting regex. In `/u` unicode mode this kind of range is an error and throws, but in non-unicode mode the individual non-class characters should be added to the resulting regex (this was a concession made to web devs consistently not understanding `-` designating a range in the past, and browsers/parsers and the spec being adjusted as a result to deal with PEBCAK).
Moonchild added the
Bug
Javascript
Regression
labels 4 months ago
Moonchild self-assigned this 4 months ago
Moonchild referenced this issue from a commit 4 months ago
Moonchild closed this issue 4 months ago
Moonchild referenced this issue from a commit 4 months ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MoonchildProductions/UXP#2103
Loading…
There is no content yet.