Skip to content

fix contextj joiner short-circuiting bidi check in is_label_valid - #90

Open
Arawoof06 wants to merge 1 commit into
ada-url:mainfrom
Arawoof06:contextj-bidi-shortcircuit
Open

fix contextj joiner short-circuiting bidi check in is_label_valid#90
Arawoof06 wants to merge 1 commit into
ada-url:mainfrom
Arawoof06:contextj-bidi-shortcircuit

Conversation

@Arawoof06

Copy link
Copy Markdown
Contributor

is_label_valid returns a whole-label verdict as soon as it validates the first U+200C/U+200D against the ContextJ rules, so a joiner that is valid in context (say, preceded by a virama) skips the RFC 5893 Bidi checks for the rest of the label and any later joiner goes unchecked. That accepts labels it should reject: U+0915 U+094D U+200C U+0627 is an LTR label with a trailing AL, which Bidi rule 5 forbids, yet to_ascii returns xn--mgb31m2ew90g. Continue the scan on a contextually valid joiner so the Bidi rules still run and every joiner is validated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants