Last modified: 2012-12-13 11:17:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T38986, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36986 - Use database form for encoding Titles in URLs
Use database form for encoding Titles in URLs
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Highest trivial (vote)
: ---
Assigned To: Wikidata bugs
storypoints: 8
:
: 36999 (view as bug list)
Depends on: 36432
Blocks: 37306
  Show dependency treegraph
 
Reported: 2012-05-20 10:03 UTC by Brendan Wyse
Modified: 2012-12-13 11:17 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Notice the encoding in the url has a '+' for the space character (33.60 KB, image/png)
2012-05-20 10:03 UTC, Brendan Wyse
Details

Description Brendan Wyse 2012-05-20 10:03:11 UTC
Created attachment 10628 [details]
Notice the encoding in the url has a '+' for the space character

I found that creating an item with a link title including a space was being encoded incorrectly intermittently when refreshing the page.

As per the attachment, the link with the title 'Cork (City)' is being encoded as 'Cork+%28city%29' when it should be 'Cork_%28city%29'.

I was able to fix in my local development working copy by replacing the space with underscore before the encoding in getPageUrl in WikibaseSite.php.

public function getPageUrl( $pageName = '' ) {
    $pageName = str_replace(' ', '_', $pageName);
    return str_replace( '$1', urlencode( $pageName ), $this->getPageUrlPath() );
}
Comment 1 Platonides 2012-05-21 17:38:19 UTC
*** Bug 36999 has been marked as a duplicate of this bug. ***
Comment 2 Thehelpfulone 2012-05-27 12:53:15 UTC
Marking as new.
Comment 3 denny vrandecic 2012-06-21 13:07:47 UTC
Before generating URLs to the client sites, normalize the form of the title.
Comment 4 denny vrandecic 2012-06-21 13:10:47 UTC
Use the canonical database form of the title to generate URLs to the client sites.
Comment 5 denny vrandecic 2012-06-28 09:25:15 UTC
Sitelinks should be modeled as objects and provide accessor functions for the different syntactic forms.
Comment 6 denny vrandecic 2012-06-28 11:34:59 UTC
Picked up for Sprint 8.
Comment 7 jeblad 2012-07-23 09:44:21 UTC
Partly (?) solved in https://gerrit.wikimedia.org/r/#/c/14069/ probably should be able to return the title as well on a db-form. The URL is now unconditionally returned.
Comment 8 Anja Jentzsch 2012-11-29 12:37:38 UTC
Verified in Wikidata demo time for sprint 9

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links