Skip to content

Commit

Permalink
Merge branch 'MDL-26940-master' of git://github.com/FMCorz/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Sep 24, 2012
2 parents dbffd99 + 1d2173a commit 7647ed4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/javascript-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,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;
Expand Down

0 comments on commit 7647ed4

Please sign in to comment.