From f8e3bbe3ae3f29f22d85abb73cea033659511168 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 27 Mar 2014 11:00:50 +1300 Subject: [PATCH] BUG Fix encoding of JS redirection script --- control/HTTPResponse.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/control/HTTPResponse.php b/control/HTTPResponse.php index 6489740d279..6d0ee52b568 100644 --- a/control/HTTPResponse.php +++ b/control/HTTPResponse.php @@ -213,12 +213,14 @@ public function output() { } if(in_array($this->statusCode, self::$redirect_codes) && headers_sent($file, $line)) { - $url = Convert::raw2htmlatt($this->headers['Location']); + $url = (string)$this->headers['Location']; + $urlATT = Convert::raw2htmlatt($url); + $urlJS = Convert::raw2js($url); echo - "

Redirecting to " - . "$url... (output started on $file, line $line)

- - "; + "

Redirecting to " + . "$urlATT... (output started on $file, line $line)

+ + "; } else { $line = $file = null; if(!headers_sent($file, $line)) {