cip / WikiOnBoard

Offline reader for zim files, in particular the wikipedia, for mobile devices. It is based on QT and zimlib. It is cross-platform and supports Symbian, Maemo, Linux and Windows based devices.
http://cip.github.com/WikiOnBoard/
15 stars 2 forks source link

Links not working if welcome page shown before #66

Closed cip closed 12 years ago

cip commented 12 years ago

Appearantly not all zim files affected. Observed with wikipedia-de.zim while wikipedia_de_all_10_2010_beta1.zim fine.

Occurs after first installation (welcome page automatically shown). Works fine after restarting app. Also occurs if help is manually openend. To reproduce: Open wikipedia-de.zim. Select Help/Help. Goto Index. Open Article. Clicking link in article always opens incorrect article. E.g. Open Graz -> Click "UNESCO-Weltkulturerbe" -> Opens Making Games Magazin. (Which is appearantly redirection from /GameStar/dev) Observed in both Version 1.1.11 and 1.1.1. Root cause: After opening welcome page appearantly base url is "wikionboard://welcome", that a clicked link is appended to this URL. WIkionboard only uses the URL path, but a "/" is then kept at the beginning of the URL. This is already handled explictly for URL which contain a namespace. (/A/ and A/ is removed before searching in zim), but not if no namespace is included in url. Newer zims appearantly have (/)A/ style links, therfore it works, while wikipedia-de.zim has links without namespace. Fix: Remove leading / of URLs. URLs are percent encoded before removal, therefore this should not have sideeffects like Articles starting with / cannot be opened.

cip commented 12 years ago

Fixed in commit 6c8fe7769b (Version 1.1.12)