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 to navigator.go.
- Observe that the link is not properly navigated to.
Environment
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 a Locator object out of the above JSON object.
- Feed the
Locator to navigator.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.
Bug Report
It appears that this libraries
Locatorisn't automatically parsing#'s in hrefs and adding them as fragments to theLocatorobjects locations. I'd also like to note that thekotlin-toolkitseems to be doing this fine.What happened?
If you pass a JSON object like the one below to the
Locatorconstructor 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 with
kotlin-toolkitwe should be parsing those fragments and adding them automatically. Perhaps similar to how the deprecatedLinkconstructor is doing it.How to reproduce?
Locatorobject out of the above JSON object.Locatortonavigator.go.Environment
Testing device
Locatorobject out of the above JSON object.2. Build aLocatorobject out of the above JSON object.Locatortonavigator.go.Environment### Environment
Testing device#### Testing device
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.