https://bugzilla.wikimedia.org/show_bug.cgi?id=36986

       Web browser: ---
             Bug #: 36986
           Summary: URL Encoding affecting titles with spaces
           Product: MediaWiki extensions
           Version: master
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: WikidataRepo
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


Created attachment 10628
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=10628
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()
);
}

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to