-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
Bug Report
It appears that this libraries Locator
isn't automatically parsing #
's in hrefs and adding them as fragments to the Locator
objects locations. I'd also like to note that the kotlin-toolkit
seems to be doing this fine.
What happened?
If you pass a JSON object like the one below to the Locator
constructor you will not be properly navigated to it, as the fragment isn't parsed.
{
"href": "7604861093435514544_67098-h-0.htm.xhtml#pgepubid00012",
"type": "application/xhtml+xml"
}
Expected behavior
It seems like for consistency withkotlin-toolkit
we should be parsing those fragments and adding them automatically. Perhaps similar to how the deprecated Link
constructor is doing it.
How to reproduce?
- Feed the attached epub file into the Readium app: pg67098-images-3.epub.zip
- Build a
Locator
object out of the above JSON object. - Feed the
Locator
tonavigator.go
. - Observe that the link is not properly navigated to.
Environment
- Readium version: 2.4.0
Testing device
- iOS version: 16.1
- Model (e.g. iPhone 11 Pro Max): iPhone 14 Pro
- Is it an emulator? Yes
- Feed the attached epub file into the Readium app.
- Build a
Locator
object out of the above JSON object.2. Build aLocator
object out of the above JSON object. - Feed the
Locator
tonavigator.go
. - Observe that the link is not properly navigated to.4. Observe that the link is not properly navigated to.
Environment### Environment
- Readium version: 2.4.0* Readium version: 2.4.0
Testing device#### Testing device
- iOS version: 16.1* iOS version: 16.1
- Model (e.g. iPhone 11 Pro Max): iPhone 14 Pro* Model (e.g. iPhone 11 Pro Max): iPhone 14 Pro
- Is it an emulator? Yes* Is it an emulator? Yes
Additional Context
I found this issue while working this one 5-stones/react-native-readium#11 (comment). You can read that if you want some more context.
Metadata
Metadata
Assignees
Labels
No labels