Skip to content
Snippets Groups Projects
Commit 3a63c3f3 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

clean up the onselect callback

This makes sure the provided callback is using alphanumerics only. I'm
not sure this is needed, but better safe than sorry.
parent 34b180e5
No related branches found
No related tags found
No related merge requests found
......@@ -257,7 +257,7 @@ var dw_mediamanager = {
edid = String.prototype.match.call(document.location, /&edid=([^&]+)/);
edid = edid ? edid[1] : 'wiki__text';
cb = String.prototype.match.call(document.location, /&onselect=([^&]+)/);
cb = cb ? cb[1] : 'dw_mediamanager_item_select';
cb = cb ? cb[1].replace(/[^\w]+/, '') : 'dw_mediamanager_item_select';
opener[cb](edid, id, opts, dw_mediamanager.align);
if(!dw_mediamanager.keepopen) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment