Skip to content

fix percent-encode of caret in path (#1140)#1141

Merged
Manishearth merged 1 commit into
servo:mainfrom
demurgos:fix/issue-1140-caret-path-percent-encode-set
Jul 8, 2026
Merged

fix percent-encode of caret in path (#1140)#1141
Manishearth merged 1 commit into
servo:mainfrom
demurgos:fix/issue-1140-caret-path-percent-encode-set

Conversation

@demurgos

@demurgos demurgos commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

This commit adds the caret symbol U+005E (^) to the path percent-encode set, as required by the WHATWG spec. This fixes percent-encoding of carets in the path during parsing.

This commit adds a test for all URL codepoints that are part of the path percent-encode set, except for ? and # which end parsing of the path.

Closes #1140

@Manishearth Manishearth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprised there are no W3C tests for this

@demurgos

demurgos commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@Manishearth

Copy link
Copy Markdown
Member

Ah, there we go, there is an unexpected success in the CI.

Just modify https://github.com/servo/rust-url/blob/main/url/tests/expected_failures.txt and check locally with cargo test

This commit adds the caret symbol U+005E (`^`) to the path percent-encode set, as required by the WHATWG spec. This fixes percent-encoding of carets in the path during parsing.

This commit adds a test for all URL codepoints that are part of the path percent-encode set, except for `?` and `#` which end parsing of the path.

Closes servo#1140
@demurgos demurgos force-pushed the fix/issue-1140-caret-path-percent-encode-set branch from e1934bb to 2faa81d Compare July 8, 2026 07:19
@demurgos

demurgos commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Done, I've also found it at the moment. This explains how it was missed: it was marked as an expected failure.

Could you please approve the workflow?

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@51f7158). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1141   +/-   ##
=======================================
  Coverage        ?   86.94%           
=======================================
  Files           ?       26           
  Lines           ?     5276           
  Branches        ?        0           
=======================================
  Hits            ?     4587           
  Misses          ?      689           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Manishearth Manishearth added this pull request to the merge queue Jul 8, 2026
Merged via the queue into servo:main with commit 25137be Jul 8, 2026
18 checks passed
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.

Missing U+005E (^) caret symbol in path percent encode set

2 participants