https://bugzilla.wikimedia.org/show_bug.cgi?id=18965
Summary: function importScript() in wikibits.js doesn't globally change all %3A and %2F to '/' and ':' Product: MediaWiki Version: 1.14.0 Platform: All OS/Version: All Status: NEW Severity: major Priority: Normal Component: API AssignedTo: roan.katt...@gmail.com ReportedBy: dness...@yahoo.com CC: bryan.tongm...@gmail.com, vasi...@gmail.com, soxre...@gmail.com When building a uri, importScript(page) uses the following call: var uri = wgScript + '?title=' + encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') + '&action=raw&ctype=text/javascript'; When applied to a pagename with more than one embedded "/" or ":" this results in an incorrect uri. For example, if page="User:Dnessett%2Fper_book%2FTemplate.js", the result of encodeURIComponent is: User:Dnessett/per_book%2FTemplate.js. The problem is the replace calls do not specify global replacement. The correct call is: encodeURIComponent(page.replace(/ /g,'_')).replace(/%2F/,'/').replace(/%3A/,':'). -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l