Permalink
Browse files

MDL-30595 workaround for PHP5.2 preg_quote trouble

  • Loading branch information...
1 parent 4828564 commit 88ec670c505ee94ce0c3f90578669c14d0bc1130 @skodak skodak committed Dec 6, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/url/locallib.php
View
@@ -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

0 comments on commit 88ec670

Please sign in to comment.