From 27a8ee7404c92a755e066669212f811de0292c69 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 30 Oct 2011 12:53:57 +0100 Subject: [PATCH 1/2] MDL-30005 bump up version after lang string change --- mod/url/version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/url/version.php b/mod/url/version.php index 5b4c1b54024..786c82e1b2a 100644 --- a/mod/url/version.php +++ b/mod/url/version.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die; -$module->version = 2010101400; +$module->version = 2010101401; $module->requires = 2010080300; // Requires this Moodle version $module->cron = 0; From 494268cd484551c5eb376e6a2931b8d850c432f7 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Tue, 1 Nov 2011 07:56:33 +0100 Subject: [PATCH 2/2] MDL-30005 regression fix for non http/ftp urls --- mod/url/locallib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/url/locallib.php b/mod/url/locallib.php index 6ef931ae77f..67849eba3f4 100644 --- a/mod/url/locallib.php +++ b/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);