r90823 MediaWiki - Code Review archive
Repository:
MediaWiki
Revision:
<
r90822
|
r90823
|
r90824
>
Date:
06:19, 26 June 2011
Author:
kaldari
Status:
ok (
Comments
)
Tags:
Comment:
mw.util.wikiUrlencode is not meant for encoding entire URLs, or if it is, its too agressive. For example, it encodes tildes, which will break some URLs. Its great for encoding page names, though, which may include question marks, etc.
Modified paths:
/trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
(modified) (
history
)
Diff
[
purge
]
Index: trunk/extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.core.js
—
—
@@ -425,10 +425,9 @@
426
426
// jump to the correct section, because when we set the hash (#...)
427
427
// the page won't reload...
428
428
window.location.reload();
429
- }
430
- else {
431
- window.location = mw.util.wikiUrlencode(
432
- mw.config.get( 'wgArticlePath' ).replace( '$1', data.redirect.pageName )
429
+ } else {
430
+ window.location = encodeURI(
431
+ wgServer + mw.config.get( 'wgArticlePath' ).replace( '$1', mw.util.wikiUrlencode( data.redirect.pageName ) )
433
432
+ '#' + data.redirect.fragment );
434
433
}
435
434
}
Follow-up revisions
Revision
Commit summary
Author
Date
r90842
removing wgServer since it isnt necessary (also should be called with mw.conf...
kaldari
19:14, 26 June 2011
Comments
#
Comment by
Kaldari
(
talk
|
contribs
)
19:15, 26 June 2011
Took out the wgServer in
r90842
.
Status & tagging log
14:29, 27 June 2011
JanPaul123
(
talk
|
contribs
)
changed the
status
of r90823
[
removed:
new
added:
ok]