diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 3c8df90eb0c..2b73ec9d620 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -291,7 +291,7 @@ function clean_param($param, $options) { if (!empty($param)) { if (preg_match(':^/:', $param)) { // root-relative, ok! - } elseif (preg_match('/^'.preg_quote($CFG->wwwroot).'/i',$param)) { + } elseif (preg_match('/^'.preg_quote($CFG->wwwroot, '/').'/i',$param)) { // absolute, and matches our wwwroot } else { // relative - let's make sure there are no tricks