Skip to content
Browse files

Merge branch 'MDL-26940-22' of git://github.com/FMCorz/moodle into MO…

…ODLE_22_STABLE
  • Loading branch information...
2 parents 3b9ed30 + e3d0ad1 commit c5a5eed7f97855a91eb509f07dc03c8c3f9c6768 @danpoltawski danpoltawski committed Sep 24, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 lib/javascript-static.js
View
9 lib/javascript-static.js
@@ -1109,6 +1109,15 @@ function openpopup(event, args) {
}
}
+ // Cleans window name because IE does not support funky ones.
+ var nameregex = /[^a-z0-9_]/i;
+ if (args.name.match(nameregex)) {
+ args.name = args.name.replace(nameregex, '_');
+ if (M.cfg.developerdebug) {
+ alert('DEVELOPER NOTICE: Invalid \'name\' passed to openpopup()');
+ }
+ }
+
var fullurl = args.url;
if (!args.url.match(/https?:\/\//)) {
fullurl = M.cfg.wwwroot + args.url;

0 comments on commit c5a5eed

Please sign in to comment.
Something went wrong with that request. Please try again.