Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update opaque_path, ensure opaque URL paths always roundtrip #925

Merged
merged 3 commits into from
Mar 25, 2025

Conversation

CarlosEduR
Copy link
Member

Tests pulled from #919

cc @anonrig

@anonrig
Copy link
Member

anonrig commented Mar 25, 2025

Can you run the linter as well?

src/parser.cpp Outdated
// This is a really unlikely scenario in real world. We should not seek
// to optimize it.
url.update_base_pathname(unicode::percent_encode(
view, character_sets::C0_CONTROL_PERCENT_ENCODE));
if (!view.empty() && view.back() == ' ') {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (!view.empty() && view.back() == ' ') {
if (view.ends_with(' ')) {

@CarlosEduR
Copy link
Member Author

Can you run the linter as well?

Yeah, I ran, looks it was a timeout... let me run again

@CarlosEduR CarlosEduR marked this pull request as ready for review March 25, 2025 02:21
@anonrig
Copy link
Member

anonrig commented Mar 25, 2025

Nice. Thanks!

@anonrig anonrig merged commit bb52321 into ada-url:main Mar 25, 2025
72 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.

2 participants