Project

General

Profile

Actions

Bug #15617

closed

template->docType is not compatible with IE

Added by old_hkdennis2k almost 19 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2006-02-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.8.1
PHP Version:
5
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you set
$SOBE->doc->docType='xhtml_trans';
IE may ignore Content-Type setting and using XML parser open the page.

I am using UTF-8 in typo3.
When php print unicode BOM and some empty lines at the beginning.
I think these clause by include() / include_once()

--- begin ---
C:\Perl\bin>get axS -H "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; SV1)" http://127.0.0.1/typo3/ |more
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://127.0.0.1/typo3/
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
Parsing of undecoded UTF-8 will give garbage when decoding entities at C:/Perl/s
ite/lib/LWP/Protocol.pm line 114.
LWP::Protocol::collect: read 243 bytes
LWP::UserAgent::request: Simple response: OK
GET http://127.0.0.1/typo3/ -
> 200 OK


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
g/TR/xhtml1/DTD/xhtml1-transitional.dtd"><
?xml-stylesheet href="#internalStyle" type="text/css"?>
<html>.........TYPO3 print content following
--- end ---

IE will ignore Content-Type and always using XML mode to read the content.
(and it is not a vaild xml becsuse <html> don't have a default namespace)

Software version
typo3 3.8.1
IE 6.0.2900.2180
apache 2.0.55
PHP 5.0.5 (cli) (built: Sep 5 2005 15:54:44) with eAccelerator v0.9.3-rc2

Solution

add @ob_clean(); at the beginng of template-startPage()

typo3/template.php

function startPage($title)    {

@ob_clean(); // FIX IE bug~!!!
+
// Get META tag containing the currently selected charset for backend output. The function sets $this->charSet.
$charSet = $this->initCharset();
$generator = $this->generator();

(issue imported from #M2549)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #19038: template->startPage returns invalid XHTMLClosedChristian Kuhn2008-06-30

Actions
Actions

Also available in: Atom PDF