From b2a1bc9fc97f993d323a88032be42a5ae3d971cc Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 17 Nov 2005 06:44:10 +0000 Subject: [PATCH] Checked in Petr Skoda's fix for SC189. It worked for us! --- lib/weblib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index bbe4078ee0d..c659f612c14 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3846,18 +3846,21 @@ function notice_yesno ($message, $linkyes, $linkno) { */ function redirect($url, $message='', $delay='0') { - $url = clean_text($url); + //$url = clean_text($url); $message = clean_text($message); $url = html_entity_decode($url); // for php < 4.3.0 this is defined in moodlelib.php $url = str_replace(array("\n", "\r"), '', $url); // some more cleaning $encodedurl = htmlentities($url); + $tmpstr = clean_text(''); //clean encoded URL + $encodedurl = substr($tmpstr, 9, strlen($tmpstr)-13); + $url = addslashes(html_entity_decode($encodedurl)); if (empty($message)) { echo ''; echo ''; // To cope with Mozilla bug } else { - + if (empty($delay)) { $delay = 3; // There's no point having a message with no delay }