Check relative link handling in webviews #11

Open
opened 2023-06-30 15:51:48 +00:00 by newsch · 1 comment
newsch commented 2023-06-30 15:51:48 +00:00 (Migrated from github.com)

In the dumps, links within the same language's wiki are written as relative
links (./Article_Title), while cross-wiki links (e.g. [[:fr:Pomme]]) are
already expanded to absolute links (https://fr.wikipedia.org/wiki/Pomme).
See https://en.wikipedia.org/wiki/Help:Interwiki_linking for more examples of wikitext linking.

The dump html includes a base element set to //lang.wikipedia.org/wiki/, but when opened as a file in firefox it assumes the scheme is file: so they don't work.

We should see if the android/ios webviews have a similar problem, and if so updating the html processing to set the scheme in the base element should handle it.

Discussed more in #10.

In the dumps, links within the same language's wiki are written as relative links (`./Article_Title`), while cross-wiki links (e.g. `[[:fr:Pomme]]`) are already expanded to absolute links (`https://fr.wikipedia.org/wiki/Pomme`). See https://en.wikipedia.org/wiki/Help:Interwiki_linking for more examples of wikitext linking. The dump html includes a [base](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) element set to `//lang.wikipedia.org/wiki/`, but when opened as a file in firefox it assumes the scheme is `file:` so they don't work. We should see if the android/ios webviews have a similar problem, and if so updating the html processing to set the scheme in the base element should handle it. [Discussed more in #10](https://github.com/organicmaps/wikiparser/pull/10#discussion_r1247454104).
biodranik commented 2023-06-30 16:35:10 +00:00 (Migrated from github.com)

Looks like current OM wiki articles do not have any links. It makes sense for compact article sizes. We can come back to this issue later if we need to enrich the wiki articles' functionality.

Looks like current OM wiki articles do not have any links. It makes sense for compact article sizes. We can come back to this issue later if we need to enrich the wiki articles' functionality.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/wikiparser#11
No description provided.