]> git.mjollnir.org Git - moodle.git/commitdiff
Merged from MOODLE_17_STABLE:
authormjollnir_ <mjollnir_>
Mon, 9 Apr 2007 20:40:22 +0000 (20:40 +0000)
committermjollnir_ <mjollnir_>
Mon, 9 Apr 2007 20:40:22 +0000 (20:40 +0000)
add support for https source for popups

previously fullscreen.php tried to load any javascript files that were
running in the popup's parent.
If the source of the script didn't start with "http:" it was assumed
that it must be a relative path. This caused problems when it tried to
make it into an absolute path.
Fixed Regex to include support for https
Credit: Peter Bulmer <peterb@catalyst.net.nz>

lib/editor/htmlarea/popups/fullscreen.php

index a85fb9bfc57480574d2c5c5c78c95f5d13502ba9..721810f887553ee6337f4f047f55857b7f20bc65 100644 (file)
@@ -29,7 +29,7 @@ for (var i = 0; i < scripts.length; ++i) {
     // document.write("<scr" + "ipt type=" + "\"script/javascript\"");
     // document.write(" src=\"../" + script.src + "\"></scr" + "ipt>");
     var new_script = document.createElement("script");
-    if (/^http:/i.test(script.src)) {
+    if (/^https?:/i.test(script.src)) {
       new_script.src = script.src;
     } else {
       new_script.src = "../" + script.src;