Last modified: 2008-12-03 21:56:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 13342 - importScript() should not encode : or /
importScript() should not encode : or /
Status: RESOLVED FIXED
Product: Wiktionary tools
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-13 09:08 UTC by Andrew Dunbar
Modified: 2008-12-03 21:56 UTC (History)
1 user (show)

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


Attachments

Description Andrew Dunbar 2008-03-13 09:08:31 UTC
cirwin's version of importScript() used on the English Wiktionary results in path names with colons and slashes encoded as %3A and %2F which leads to a different cache entry to scripts imported manually using document.write().

If both versions are included it is hard to know which version will actually be called. For programmers it is easy to flush the wrong one when working on their code.
Comment 1 Chad H. 2008-10-16 18:10:14 UTC
Now that importScript() is a part of core, has this been fixed in core, or is this still an issue?
Comment 2 Brion Vibber 2008-12-03 21:56:38 UTC
The current implementation escapes ':' and '/', producing URLs like this:

/trunk/index.php?action=raw&ctype=text/javascript&title=MediaWiki%3ASysop.js

If we're recommending consistent use of importScript() it probably doesn't really matter, but it wouldn't hurt to be self-consistent with how we generate other URLs... of course even with the change to the encoding, the order of the pieces is different.

MediaWiki usually generates URLs with the title component first; also caching options will differ depending on who's generating the URL and when.

Have switched the order and the encoding to be more consistent. Applied in r44192.

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


Navigation
Links