Template talk:GeoGroup
![]() | Geographical coordinates | |||
|
Microformats | ||||
|
![]() | This template was considered for deletion on 2007 August 2. The result of the discussion was "Keep". |
|
||
This page has archives. Sections older than 60 days may be automatically archived by Lowercase sigmabot III when more than 1 section is present. |
Bizarre URL generated from category
I have been adding this template to several categories, all of which have worked fantastically well. However, after adding it to category:Aquaria in Oregon, the Google Maps link is https://maps.google.com/maps?q=http://toolserver.org/~para/cgi-bin/kmlexport%3Farticle%3DCategory:Aquaria_in_Oregon%26l%3D0%26usecache%3D1++adding:+fbeb8caf27bfeedc3302f0880c1a270e.kml+%28deflated+72%25%29 Google Maps shows North America and gives a "we don't understand URL". Neither do I. What could have caused this?
When I used the browser "back" and clicked again, it worked fine. —EncMstr (talk) 20:40, 29 August 2013 (UTC)
Apostrophe URLEncode
The toolserver kmlexport code encodes the apostrophe as %2526%252339%253B instead of %27, generating malformed URLs. Considering for example the category
https://commons.wikimedia.org/wiki/Category:Gates_of_L%27Aquila
kmlexport generates the following URL (that doesn't work)
instead of
Pietro (talk) 01:45, 9 September 2013 (UTC)
- There's a difference in what this template and commons:Template:GeoGroupTemplate do before passing anything on to the toolserver, and it's the Commons template at fault in this urlencoding nightmare. This template uses the FULLPAGENAMEE keyword, whereas Commons uses FULLPAGENAME. URLs break when they contain HTML encoded characters:
{{urlencode:{{urlencode:{{FULLPAGENAME}}}}}} → {{urlencode:{{urlencode:Category:Gates of L'Aquila}}}} → {{urlencode:Category%3AGates+of+L%26%2339%3BAquila}} → Category%253AGates%2Bof%2BL%2526%252339%253BAquila
{{urlencode:{{urlencode:{{FULLPAGENAMEE}}}}}} → {{urlencode:{{urlencode:Category:Gates_of_L%27Aquila}}}} → {{urlencode:Category%3AGates_of_L%2527Aquila}} → Category%253AGates_of_L%252527Aquila
- They're double urlencoded because the article parameter is urlencoded first, and then again when the q parameter is urlencoded, since both can contain ampersands. --Para (talk) 23:15, 10 September 2013 (UTC)