incorrect use of preg_quote(), add '/' to list of quoted chars - see man page; merged from MOODLE_14_STABLE

This commit is contained in:
skodak
2005-02-03 19:37:11 +00:00
parent f24148ef0f
commit 60ecca3a09
+1 -1
View File
@@ -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