Project

General

Profile

Feature #24059 » feature_16395_v2.diff

Administrator Admin, 2010-11-16 19:02

View differences:

typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy)
$GLOBALS['TSFE']->xhtmlVersion = 105;
break;
case 'xhtml_11':
case 'xhtml+rdfa_10':
$GLOBALS['TSFE']->xhtmlVersion = 110;
break;
case 'xhtml_2':
......
$docTypeParts[] = $GLOBALS['TSFE']->config['config']['xmlprologue'];
}
// Part 2: DTD
if ($GLOBALS['TSFE']->config['config']['doctype']) {
switch ((string) $GLOBALS['TSFE']->config['config']['doctype']) {
$doctype = $GLOBALS['TSFE']->config['config']['doctype'];
if ($doctype) {
switch ($doctype) {
case 'xhtml_trans' :
$docTypeParts[] = '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
......
PUBLIC "-//W3C//DTD XHTML 2.0//EN"
"http://www.w3.org/TR/xhtml2/DTD/xhtml2.dtd">';
break;
case 'xhtml+rdfa_10' :
$docTypeParts[] = '<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">';
break;
case 'html_5' :
$docTypeParts[] = '<!DOCTYPE html>';
break;
case 'none' :
break;
default :
$docTypeParts[] = $GLOBALS['TSFE']->config['config']['doctype'];
$docTypeParts[] = $doctype;
}
} else {
$docTypeParts[] = '<!DOCTYPE html
......
}
if ($GLOBALS['TSFE']->xhtmlVersion) {
// Setting <html> tag attributes:
$htmlTagAttributes['xmlns'] = 'http://www.w3.org/1999/xhtml';
$htmlTagAttributes['xml:lang'] = $htmlLang;
if ($GLOBALS['TSFE']->xhtmlVersion < 110) {
$htmlTagAttributes['lang'] = $htmlLang;
}
if ($GLOBALS['TSFE']->xhtmlVersion < 110 || $doctype === 'html_5') {
$htmlTagAttributes['lang'] = $htmlLang;
}
if ($GLOBALS['TSFE']->xhtmlVersion || $doctype === 'html_5') {
$htmlTagAttributes['xmlns'] = 'http://www.w3.org/1999/xhtml'; // We add this to HTML5 to achieve a slightly better backwards compatibility
foreach ($GLOBALS['TSFE']->config['config']['namespaces.'] as $prefix => $uri) {
$htmlTagAttributes['xmlns:' . htmlspecialchars($prefix)] = $uri; // $uri gets htmlspecialchared later
}
}
......
var $fromTC = 0; // Means that everything is returned instead of only uid and label-field
}
?>
?>
(2-2/2)