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

Improve Url equality #533

Closed
wants to merge 2 commits into from
Closed

Improve Url equality #533

wants to merge 2 commits into from

Conversation

mickael-menu
Copy link
Member

Instead of comparing URL to their string representation, compare their components with different rules:

  • Scheme is case insensitive.
  • Paths must be compared percent-decoded.
  • Authority, fragment and query parameters must match.

The reason for this change is that some EPUBs encode unreserved characters which breaks locating a Link from an HREF.

For example both of these are valid relative URLs which point to the same resource:

  • Text/Ces_choses_qu'on_laisse.xhtml
  • Text/Ces_choses_qu%27on_laisse.xhtml

@mickael-menu mickael-menu requested a review from qnga June 11, 2024 13:03
@mickael-menu
Copy link
Member Author

Superseded by #534

@mickael-menu mickael-menu deleted the fix/url-equality branch June 12, 2024 13:41
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.

1 participant