Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -49,8 +49,9 @@ |
50 | 50 | } |
51 | 51 | |
52 | 52 | function importScript(page) { |
| 53 | + // TODO: might want to introduce a utility function to match wfUrlencode() in PHP |
53 | 54 | var uri = wgScript + '?title=' + |
54 | | - encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') + |
| 55 | + encodeURIComponent(page.replace(/ /g,'_')).replace(/%2F/ig,'/').replace(/%3A/ig,':') + |
55 | 56 | '&action=raw&ctype=text/javascript'; |
56 | 57 | return importScriptURI(uri); |
57 | 58 | } |