diff --git a/classes/question_ui_renderer.php b/classes/question_ui_renderer.php index f1d8c79..99b0a2b 100644 --- a/classes/question_ui_renderer.php +++ b/classes/question_ui_renderer.php @@ -564,7 +564,7 @@ private function replace_qpy_urls(string $input): string { return preg_replace_callback( // The first two path segments are namespace and short name, and so more restrictive. - ";qpy://static(/(?:[a-z_][a-z0-9_]{1,127}){2}(?:/[\w\-@:%+.~=]+)+);", + ";qpy://static((?:/[a-z_][a-z0-9_]{0,126}){2}(?:/[\w\-@:%+.~=]+)+);", function (array $match) use ($question) { $path = $match[1]; $url = \moodle_url::make_pluginfile_url(