After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779097 - Wikipedia links are misrendered when article contains :
Wikipedia links are misrendered when article contains :
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: map view
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2017-02-22 21:34 UTC by Marcus Lundblad
Modified: 2017-03-06 20:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
PlaceBubble: Handle colon in Wikipedia articles (1.13 KB, patch)
2017-02-26 21:15 UTC, Marcus Lundblad
committed Details | Review

Description Marcus Lundblad 2017-02-22 21:34:32 UTC
If a Wikipediareferens contains a : in the article part, the link we generate in the place bubble becomes incorrect.

For an example, search for "Sankt Eriksplan" and select the metro station (the train symbol in the list).
The Wikipedia referense in this example is: sv:S:t Eriksplan

Looking at the code, in placeBubble.js:106 it's obvious it splits the string on : and only takes out the first two parts to contruct an https://<lang>.wikipedia.org/wiki/<article> linke, which in this case only gets "S" as the article part, so it should probably re-join the array parts after [0] instead of just taking parts[1].
Comment 1 Marcus Lundblad 2017-02-26 21:15:23 UTC
Created attachment 346771 [details] [review]
PlaceBubble: Handle colon in Wikipedia articles

Properly handle a colon (:) character in a Wikipedia
tag. Also URI escape the article part to avoid pontential
problems, like & or ? in titles.
Comment 2 Jonas Danielsson 2017-03-06 10:05:03 UTC
Review of attachment 346771 [details] [review]:

lgtm!
Comment 3 Marcus Lundblad 2017-03-06 20:08:06 UTC
Attachment 346771 [details] pushed as 9021ef6 - PlaceBubble: Handle colon in Wikipedia articles