Skip to content

Commit

Permalink
Merge branch 'w43_MDL-30005_m22_uri' of git://github.com/skodak/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
Aparup Banerjee committed Nov 1, 2011
2 parents 203683e + 0775152 commit ddba89c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/url/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function url_get_full_url($url, $cm, $course, $config=null) {
// make sure there are no encoded entities, it is ok to do this twice
$fullurl = html_entity_decode($url->externalurl, ENT_QUOTES, 'UTF-8');

if (preg_match('/^(\/|https?:|ftp:)/i', $fullurl) or preg_match('|^/|', $url)) {
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(';/?:@=&$_.+!*(),-#%', '/');
$fullurl = preg_replace_callback("/[^$allowed]/", 'url_filter_callback', $fullurl);
Expand Down

0 comments on commit ddba89c

Please sign in to comment.