Bug #15617
closedtemplate->docType is not compatible with IE
0%
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> 200 OK
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/ -

<!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)
Updated by Christian Kuhn over 15 years ago
Resolved with unable to reproduce: I do not get any empty lines in current trunk (r5210) preceding the DOCTYPE tag.
The xmlns issue is reported with #20216.