r67853 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67852‎ | r67853 | r67854 >
Date:14:34, 11 June 2010
Author:hartman
Status:ok
Tags:
Comment:
Use encodeURI instead of encodeURIComponent + hacks
Modified paths:
  • /trunk/extensions/WikimediaMobile/MobileRedirect.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaMobile/MobileRedirect.js
@@ -17,7 +17,7 @@
1818 var mainPage = wgMainPageTitle.replace(/ /g, '_');
1919 var url = 'http://' + wgContentLanguage + ".m.wikipedia.org/";
2020 if (wgPageName != mainPage) {
21 - url += "wiki/" + encodeURIComponent(wgPageName).replace('%2F','/').replace('%3A',':');
 21+ url += "wiki/" + encodeURI(wgPageName);
2222 }
2323 return url;
2424 }

Status & tagging log