From ec574f8cdb55f51ca9303553479566dcc0714d66 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Fri, 7 Jun 2013 11:21:13 +0200 Subject: [PATCH] Revert "Issue #12545: Enforce XHTML strict output for all pages served" This reverts commit 4fc1d8b8290872e660c6d9a179c4c2209adf7e26. Fixes #13304, #14759, #15446 Conflicts: core/http_api.php --- core/html_api.php | 7 +++---- core/http_api.php | 10 +--------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/core/html_api.php b/core/html_api.php index a0fa8d2de6..0208af2129 100644 --- a/core/html_api.php +++ b/core/html_api.php @@ -300,9 +300,8 @@ function html_page_bottom1a( $p_file = null ) { * @return null */ function html_begin() { - echo ''; - echo ''; - echo ''; + echo '', "\n"; + echo '', "\n"; } /** @@ -318,7 +317,7 @@ function html_head_begin() { * @return null */ function html_content_type() { - echo "\t", '', "\n"; + echo "\t", '', "\n"; } /** diff --git a/core/http_api.php b/core/http_api.php index 0e716537f5..6a859307f3 100644 --- a/core/http_api.php +++ b/core/http_api.php @@ -128,15 +128,7 @@ function http_caching_headers( $p_allow_caching=false ) { */ function http_content_headers() { if ( !headers_sent() ) { - // Only use the application/xhtml+xml MIME type if the browser - // has indicated support for this type. Internet Explorer - // prior to version 9 only supports the text/html MIME type. - if ( stristr( $_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml' ) ) { - header( 'Content-Type: application/xhtml+xml; charset=UTF-8' ); - } else { - header( 'Content-Type: text/html; charset=UTF-8' ); - } - + header( 'Content-Type: text/html; charset=UTF-8' ); // Disallow Internet Explorer from attempting to second guess the Content-Type // header as per http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx header( 'X-Content-Type-Options: nosniff' );