From c78f424cf68adc7bd5807355473f1e698162d4ad Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 25 Jan 2008 10:46:39 +0000 Subject: [PATCH] Clarifying unorthodox MIME type --- includes/api/ApiFormatDbg.php | 3 +++ includes/api/ApiFormatTxt.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/includes/api/ApiFormatDbg.php b/includes/api/ApiFormatDbg.php index 2b70bca936..e4bfbdb384 100644 --- a/includes/api/ApiFormatDbg.php +++ b/includes/api/ApiFormatDbg.php @@ -38,6 +38,9 @@ class ApiFormatDbg extends ApiFormatBase { } public function getMimeType() { + # This looks like it should be text/plain, but IE7 is so + # brain-damaged it tries to parse text/plain as HTML if it + # contains HTML tags. Using MIME text/text works around this bug return 'text/text'; } diff --git a/includes/api/ApiFormatTxt.php b/includes/api/ApiFormatTxt.php index 625d428832..38d136452a 100644 --- a/includes/api/ApiFormatTxt.php +++ b/includes/api/ApiFormatTxt.php @@ -38,6 +38,9 @@ class ApiFormatTxt extends ApiFormatBase { } public function getMimeType() { + # This looks like it should be text/plain, but IE7 is so + # brain-damaged it tries to parse text/plain as HTML if it + # contains HTML tags. Using MIME text/text works around this bug return 'text/text'; } -- 2.20.1