Page MenuHomePhabricator

slashes in identifiers get rendered incorrectly
Closed, ResolvedPublic

Description

First reported at the Wikidata village pump (https://www.wikidata.org/w/index.php?title=Wikidata:Project_chat&oldid=307147924#Freebase_links_are_broken) "It seems that the urlencoder for Freebase identifier (P646) is broken, it produces %2f instead of /. See for example Anderswo (Q20992288)"

Freebase identifier (https://www.wikidata.org/wiki/Property:P646) recently got converted from string to identifier. If you look at https://www.wikidata.org/wiki/Q20992288 you'll see the problem in action. %2f is the urlencoded version of '/' so my assumption is that the new identifier code urlencodes the string to prevent html code from being injected?

Event Timeline

Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 25 2016, 2:56 PM
Multichill triaged this task as High priority.Feb 25 2016, 2:56 PM

Note this may be just a problem for the Freebase Identifier; if you replace just the leading '%2f' with '/' the remaining '%2f' characters are correctly interpreted by the server (as they should be) - the problem is the formatter URL ends with the server name which is probably a bad idea (but may be how freebase needs to work?)

Change 273309 had a related patch set uploaded (by JanZerebecki):
Fix over-encoding of expanded URLs

https://gerrit.wikimedia.org/r/273309

Change 273309 merged by jenkins-bot:
Fix over-encoding of expanded URLs

https://gerrit.wikimedia.org/r/273309

Change 273467 had a related patch set uploaded (by JanZerebecki):
Fix over-encoding of expanded URLs

https://gerrit.wikimedia.org/r/273467

Change 273914 had a related patch set uploaded (by JanZerebecki):
Update Wikibase: Fix over-encoding of expanded URLs

https://gerrit.wikimedia.org/r/273914

Change 273914 abandoned by JanZerebecki:
Update Wikibase: Fix over-encoding of expanded URLs

Reason:
wrong branch

https://gerrit.wikimedia.org/r/273914

Change 273917 had a related patch set uploaded (by JanZerebecki):
Update Wikibase: Fix over-encoding of expanded URLs

https://gerrit.wikimedia.org/r/273917

Change 273917 merged by jenkins-bot:
Update Wikibase: Fix over-encoding of expanded URLs

https://gerrit.wikimedia.org/r/273917

JanZerebecki closed this task as Resolved.Feb 29 2016, 4:29 PM