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 @@
426426 // jump to the correct section, because when we set the hash (#...)
427427 // the page won't reload...
428428 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 ) )
433432 + '#' + data.redirect.fragment );
434433 }
435434 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r90842removing wgServer since it isnt necessary (also should be called with mw.conf...kaldari19:14, 26 June 2011

Comments

#Comment by Kaldari (talk | contribs)   19:15, 26 June 2011

Took out the wgServer in r90842.

Status & tagging log