dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97c16f3
)
unencode all slashes and colons in importScript(), not just the first one of each
author
Ilmari Karonen
<vyznev@users.mediawiki.org>
Tue, 12 May 2009 23:56:28 +0000
(23:56 +0000)
committer
Ilmari Karonen
<vyznev@users.mediawiki.org>
Tue, 12 May 2009 23:56:28 +0000
(23:56 +0000)
skins/common/wikibits.js
patch
|
blob
|
history
diff --git
a/skins/common/wikibits.js
b/skins/common/wikibits.js
index
30686fb
..
5e8e6ad
100644
(file)
--- a/
skins/common/wikibits.js
+++ b/
skins/common/wikibits.js
@@
-49,8
+49,9
@@
function hookEvent(hookName, hookFunct) {
}
function importScript(page) {
+ // TODO: might want to introduce a utility function to match wfUrlencode() in PHP
var uri = wgScript + '?title=' +
- encodeURIComponent(page.replace(/ /g,'_')).replace(
'%2F','/').replace('%3A'
,':') +
+ encodeURIComponent(page.replace(/ /g,'_')).replace(
/%2F/ig,'/').replace(/%3A/ig
,':') +
'&action=raw&ctype=text/javascript';
return importScriptURI(uri);
}