FolioReader / FolioReader-Android

A Java ePub reader and parser framework for Android.
BSD 3-Clause "New" or "Revised" License
2.25k stars 716 forks source link

Encoded urls Not working #371

Open nuwanchamara opened 5 years ago

nuwanchamara commented 5 years ago

Issue / Feature - encoded urls in content.opf not working FolioReader version - 0.5.4 FolioReader Stock / Modified -
Android SDK - Mobile / Tablet / Emulator Info -
Crash / Error -

Steps to reproduce / Describe in detail - open epub using folioreader

My epub's content .opf

`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

true Ali Baba & Horu 40_Book Finalest 2019-04-12T03:58:10Z en-GB en-US 2019-04-12T03:58:10Z urn:uuid:1E009E2F-6B46-4822-8A41-0A1CD2528035 ...... ` It has encoded urls like "Ali_Baba_%26_Horu_40_Book.xhtml" App Logs as follows 2019-04-25 11:39:38.164 12173-12173/com.treinetic.whiteshark W/AppUtil: -> getAvailablePortNumber -> portNumber 8080 not available, 38907 is available 2019-04-25 11:39:38.187 12173-12173/com.treinetic.whiteshark W/Java7Support: Unable to load JDK7 types (annotations, java.nio.file.Path): no Java7 support added 2019-04-25 11:39:38.217 12173-12173/com.treinetic.whiteshark I/HwPointEventFilter: do not support AFT because of no config 2019-04-25 11:39:38.334 12173-12173/com.treinetic.whiteshark I/TextToSpeech: Sucessfully bound to com.google.android.tts 2019-04-25 11:39:38.368 12173-12173/com.treinetic.whiteshark I/WebViewFactory: Loading com.android.chrome version 73.0.3683.90 (code 368309052) 2019-04-25 11:39:38.430 12173-12173/com.treinetic.whiteshark I/cr_LibraryLoader: Time to load native libraries: 6 ms (timestamps 4669-4675) 2019-04-25 11:39:38.449 12173-12173/com.treinetic.whiteshark I/chromium: [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0 2019-04-25 11:39:38.450 12173-12173/com.treinetic.whiteshark I/cr_LibraryLoader: Expected native library version number "73.0.3683.90", actual native library version number "73.0.3683.90" 2019-04-25 11:39:38.474 12173-12173/com.treinetic.whiteshark I/cr_BrowserStartup: Initializing chromium process, singleProcess=true 2019-04-25 11:39:38.479 12173-12173/com.treinetic.whiteshark W/ResourceType: For resource 0x7f130530, entry index(1328) is beyond type entryCount(626) 2019-04-25 11:39:38.479 12173-12173/com.treinetic.whiteshark W/ResourceType: Failure getting entry for 0x7f130530 (t=18 e=1328) (error -75) 2019-04-25 11:39:38.758 12173-12173/com.treinetic.whiteshark I/Choreographer: Skipped 31 frames! The application may be doing too much work on its main thread. 2019-04-25 11:39:38.764 12173-12173/com.treinetic.whiteshark E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY) 2019-04-25 11:39:38.947 12173-12173/com.treinetic.whiteshark I/HwSecImmHelper: mSecurityInputMethodService is null 2019-04-25 11:39:38.958 12173-12340/com.treinetic.whiteshark W/cr_media: Requires BLUETOOTH permission 2019-04-25 11:39:39.013 12173-12363/com.treinetic.whiteshark W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc 2019-04-25 11:39:39.013 12173-12363/com.treinetic.whiteshark W/VideoCapabilities: Unrecognized profile 2130706434 for video/avc 2019-04-25 11:39:39.022 12173-12363/com.treinetic.whiteshark W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc 2019-04-25 11:39:39.022 12173-12363/com.treinetic.whiteshark W/VideoCapabilities: Unrecognized profile 2130706434 for video/avc 2019-04-25 11:39:39.025 12173-12363/com.treinetic.whiteshark W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc 2019-04-25 11:39:39.025 12173-12363/com.treinetic.whiteshark W/VideoCapabilities: Unrecognized profile 2130706434 for video/avc 2019-04-25 11:39:39.048 12173-12363/com.treinetic.whiteshark W/Utils: could not parse long range '35-34' 2019-04-25 11:39:39.048 12173-12363/com.treinetic.whiteshark W/Utils: could not parse long range '137-134' 2019-04-25 11:39:39.048 12173-12363/com.treinetic.whiteshark W/Utils: could not parse long range '146-132' 2019-04-25 11:39:39.071 12173-12363/com.treinetic.whiteshark I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es 2019-04-25 11:39:39.088 12173-12173/com.treinetic.whiteshark I/TextToSpeech: Connected to ComponentInfo{com.google.android.tts/com.google.android.tts.service.GoogleTTSService} 2019-04-25 11:39:39.125 12173-12209/com.treinetic.whiteshark I/TextToSpeech: Set up connection to ComponentInfo{com.google.android.tts/com.google.android.tts.service.GoogleTTSService} 2019-04-25 11:39:39.360 12173-12173/com.treinetic.whiteshark E/WebViewConsole: Uncaught ReferenceError: checkCompatMode is not defined [http://127.0.0.1:38907/8c05fe7c8c1eacf34a4d9af64636765f/OEBPS/:1] 2019-04-25 11:39:39.361 12173-12173/com.treinetic.whiteshark E/WebViewConsole: Uncaught ReferenceError: getReadingTime is not defined [http://127.0.0.1:38907/8c05fe7c8c1eacf34a4d9af64636765f/OEBPS/:1] 2019-04-25 11:39:39.361 12173-12173/com.treinetic.whiteshark E/WebViewConsole: Uncaught ReferenceError: setMediaOverlayStyle is not defined [http://127.0.0.1:38907/8c05fe7c8c1eacf34a4d9af64636765f/OEBPS/:1] ` 2019-04-25 11:58:57.934 12173-14166/com.treinetic.whiteshark E/NanoHTTPD: Communication with the client broken, or an bug in the handler code java.lang.NullPointerException: Attempt to invoke virtual method 'org.nanohttpd.protocols.http.response.Response org.nanohttpd.router.RouterNanoHTTPD$UriResource.process(java.util.Map, org.nanohttpd.protocols.http.IHTTPSession)' on a null object reference at org.nanohttpd.router.RouterNanoHTTPD$UriRouter.process(RouterNanoHTTPD.java:597) at org.nanohttpd.router.RouterNanoHTTPD.serve(RouterNanoHTTPD.java:672) at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:376) at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:372) at org.nanohttpd.protocols.http.NanoHTTPD.handle(NanoHTTPD.java:535) at org.nanohttpd.protocols.http.HTTPSession.execute(HTTPSession.java:421) at org.nanohttpd.protocols.http.ClientHandler.run(ClientHandler.java:75) at java.lang.Thread.run(Thread.java:776) 2019-04-25 11:59:00.961 12173-14165/com.treinetic.whiteshark E/ResourceHandler: Exception in get kotlin.KotlinNullPointerException at org.readium.r2.streamer.server.handler.ResourceHandler.get(ResourceHandler.kt:51) at org.nanohttpd.router.RouterNanoHTTPD$UriResource.process(RouterNanoHTTPD.java:385) at org.nanohttpd.router.RouterNanoHTTPD$UriRouter.process(RouterNanoHTTPD.java:597) at org.nanohttpd.router.RouterNanoHTTPD.serve(RouterNanoHTTPD.java:672) at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:376) at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:372) at org.nanohttpd.protocols.http.NanoHTTPD.handle(NanoHTTPD.java:535) at org.nanohttpd.protocols.http.HTTPSession.execute(HTTPSession.java:421) at org.nanohttpd.protocols.http.ClientHandler.run(ClientHandler.java:75) at java.lang.Thread.run(Thread.java:776) 2019-04-25 11:59:02.078 12173-14165/com.treinetic.whiteshark E/NanoHTTPD: Communication with the client broken, or an bug in the handler code java.lang.NullPointerException: Attempt to invoke virtual method 'org.nanohttpd.protocols.http.response.Response org.nanohttpd.router.RouterNanoHTTPD$UriResource.process(java.util.Map, org.nanohttpd.protocols.http.IHTTPSession)' on a null object reference at org.nanohttpd.router.RouterNanoHTTPD$UriRouter.process(RouterNanoHTTPD.java:597) at org.nanohttpd.router.RouterNanoHTTPD.serve(RouterNanoHTTPD.java:672) at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:376) at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:372) at org.nanohttpd.protocols.http.NanoHTTPD.handle(NanoHTTPD.java:535) at org.nanohttpd.protocols.http.HTTPSession.execute(HTTPSession.java:421) at org.nanohttpd.protocols.http.ClientHandler.run(ClientHandler.java:75) at java.lang.Thread.run(Thread.java:776) 2019-04-25 11:59:02.092 12173-14179/com.treinetic.whiteshark E/NanoHTTPD: Communication with the client broken, or an bug in the handler code java.lang.NullPointerException: Attempt to invoke virtual method 'org.nanohttpd.protocols.http.response.Response org.nanohttpd.router.RouterNanoHTTPD$UriResource.process(java.util.Map, org.nanohttpd.protocols.http.IHTTPSession)' on a null object reference at org.nanohttpd.router.RouterNanoHTTPD$UriRouter.process(RouterNanoHTTPD.java:597) at org.nanohttpd.router.RouterNanoHTTPD.serve(RouterNanoHTTPD.java:672) at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:376) at org.nanohttpd.protocols.http.NanoHTTPD$1.handle(NanoHTTPD.java:372) at org.nanohttpd.protocols.http.NanoHTTPD.handle(NanoHTTPD.java:535) at org.nanohttpd.protocols.http.HTTPSession.execute(HTTPSession.java:421) at org.nanohttpd.protocols.http.ClientHandler.run(ClientHandler.java:75) at java.lang.Thread.run(Thread.java:776) ` Showing empty in book reader view. If i chage the href like below it works fine. `` just replace **%26** with **&** How to fix this work with encoded urls ?
mahavir155 commented 5 years ago

@nuwanchamara it also seems to be working properly here. Can you check if this is still an issue with you?