Skip to content

Conversation

@karlseguin
Copy link
Collaborator

This is driven by dom/nodes/ParentNode-querySelector-escapes.html

It seems like invalid unicode and null terminating characters should be replaced with the replacement character (i.e. �).

Also, allow escape sequence to be at the end of the string.

For the functions I changed, I added:

const sel = p.s;
const sel_len = sel.len

To improve readability (selector can't be used because it shadows the import).

Tests went from 39/68 -> 66/68.

This is driven by dom/nodes/ParentNode-querySelector-escapes.html

It seems like invalid unicode and null terminating characters should be replaced
with the replacement character (i.e. �).

Also, allow escape sequence to be at the end of the string.

For the functions I changed, I added:

```zig
const sel = p.s;
const sel_len = sel.len
```

To improve readability (`selector` can't be used because it shadows the import).

Tests went from 39/68 -> 66/68.
@krichprollsch krichprollsch merged commit d9e5821 into main May 8, 2025
12 checks passed
@krichprollsch krichprollsch deleted the css_selector_parsing_tweaks branch May 8, 2025 12:43
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants