Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-30005 regression fix for non http/ftp urls

  • Loading branch information...
commit 494268cd484551c5eb376e6a2931b8d850c432f7 1 parent 27a8ee7
@skodak skodak authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mod/url/locallib.php
View
2  mod/url/locallib.php
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.