Last modified: 2008-12-03 21:56:38 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 T15342, the corresponding Phabricator task for complete and up-to-date bug report information.
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