diff --git a/mod/hotpot/lib.php b/mod/hotpot/lib.php index ac3daa96b50..0af721f172e 100644 --- a/mod/hotpot/lib.php +++ b/mod/hotpot/lib.php @@ -1805,7 +1805,7 @@ function hotpot_convert_navbutton_url($baseurl, $reference, $url, $course, $stri $url = hotpot_convert_url($baseurl, $reference, $url, false); // is this a $url for another hotpot in this course ? - if (preg_match("|^$baseurl(.*)$|", $url, $matches)) { + if (preg_match("|^".preg_quote($baseurl)."(.*)$|", $url, $matches)) { if ($records = get_records_select('hotpot', "course='$course' AND reference='".$matches[1]."'")) { $ids = array_keys($records); $url = "$CFG->wwwroot/mod/hotpot/view.php?hp=".$ids[0];