diff --git a/mod/url/locallib.php b/mod/url/locallib.php index bb452af472c..e07d1c65e92 100644 --- a/mod/url/locallib.php +++ b/mod/url/locallib.php @@ -91,7 +91,7 @@ function url_get_full_url($url, $cm, $course, $config=null) { if (preg_match('/^(\/|https?:|ftp:)/i', $fullurl) or preg_match('|^/|', $fullurl)) { // encode extra chars in URLs - this does not make it always valid, but it helps with some UTF-8 problems - $allowed = "a-zA-Z0-9".preg_quote(';/?:@=&$_.+!*(),-#%', '/'); + $allowed = "a-zA-Z0-9".preg_quote(';/?:@=&$_.+!*(),#%-', '/'); $fullurl = preg_replace_callback("/[^$allowed]/", 'url_filter_callback', $fullurl); } else { // encode special chars only