[Typo3-dev] TYPo3 3.6.0RC1 and XHTML compliance
Simon Child
simondt at gpuk.net
Thu Jan 1 01:45:05 CET 2004
"Simon Child" <simondt at gpuk.net> wrote in message
news:mailman.1.1072916069.23398.typo3-dev at lists.netfielders.de...
> But if I do not set xhtml_cleaning then typo3 (or perhaps the template
> autoparser??) changes some of my closing tags to upper case and so
> validation still fails.
Just tried looking at class.tx_automaketemplate_pi1.php and changed line 133
$endTag = "</".$firstTagName.">";
to
$endTag = "</".$firstTagName.">";
$endTag=strtolower($endTag);
and all my problems went away - it now validates so long as I switch off
xhtml_cleaning
Summarising:
* xhtml_cleaning breaks xhtml compliance since it corrupts the xmlns and xml
declarations
* tslib/class.tslib_pagegen.php perhaps needs updating to reorder the xml
declaration and to add an xmlns declaration
* class.tx_automaketemplate_pi1.php is uppercasing the closing tags - looks
like this is coming from t3lib/class.t3lib_parsehtml.php: function
getFirstTagName:
function getFirstTagName($str) {
list($tag) =
split('[[:space:]]',substr(strtoupper(trim($this->getFirstTag($str))),1,-1),
2);
return trim($tag);
I should have thought that should be strlower - why would it need to be
upper-cased? (But if I change it to strtolower then it breaks my site, so
presumably somewhere else is expecting upper case tags?)
--
Simon Child
More information about the TYPO3-dev
mailing list