readium / kotlin-toolkit

A toolkit for ebooks, audiobooks and comics written in Kotlin
https://readium.org/kotlin-toolkit
BSD 3-Clause "New" or "Revised" License
163 stars 72 forks source link

Improve `Url` equality #533

Closed mickael-menu closed 1 month ago

mickael-menu commented 1 month ago

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

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:

mickael-menu commented 1 month ago

Superseded by https://github.com/readium/kotlin-toolkit/pull/534