Last modified: 2011-04-30 01:16:50 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 T20965, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18965 - function importScript() in wikibits.js doesn't globally change all %3A and %2F to '/' and ':'
function importScript() in wikibits.js doesn't globally change all %3A and %2...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.14.x
All All
: Normal major (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-27 23:26 UTC by Dan Nessett
Modified: 2011-04-30 01:16 UTC (History)
4 users (show)

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


Attachments

Description Dan Nessett 2009-05-27 23:26:09 UTC
When building a uri, importScript(page) uses the following call: var uri = wgScript + '?title=' +  encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') + '&action=raw&ctype=text/javascript'; When applied to a pagename with more than one embedded "/" or ":" this results in an incorrect uri. For example, if page="User:Dnessett%2Fper_book%2FTemplate.js", the result of encodeURIComponent is: User:Dnessett/per_book%2FTemplate.js. The problem is the replace calls do not specify global replacement. The correct call is: encodeURIComponent(page.replace(/ /g,'_')).replace(/%2F/,'/').replace(/%3A/,':').
Comment 1 Splarka 2009-05-27 23:43:03 UTC
Already fixed in r50537. Will go live next scap.

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


Navigation
Links