Russian TYPO3 community

Russian TYPO3 community (http://forum.typo3.ru/index.php)
-   TypoScript практикум (http://forum.typo3.ru/forumdisplay.php?f=27)
-   -   Тэги типа <foo /> (http://forum.typo3.ru/showthread.php?t=7292)

hlor 25.12.2008 11:26

Тэги типа <foo />
 
Можно ли заставить typo генерировать тэги в формате <foo> вместо <foo />?

Вот, что говорит валидатор про сабжи:
Код:

…content="text/html; charset=windows-1251" />
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.

Это ворнинг, далее в этой же строке ошибка:
Код:

…content="text/html; charset=windows-1251" />
You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:

* putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
* forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
* using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character.

да, доктайп <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

hlor 25.12.2008 11:27

FF из-за ошибок впадает в "режим совместимости". не есть хорошо :(

hlor 25.12.2008 12:51

Чистка кода показала, что такие тэги выставляются только в <HEAD></HEAD>
Дважды в META, один - в LINK

Кто вставляет
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<meta name="generator" content="TYPO3 4.2 CMS" />
<link rel="stylesheet" type="text/css" href="typo3temp/stylesheet_8192c2092f.css" />

Если исправить, код проходит валидацию.

hlor 25.12.2008 13:49

Все это хардкодед в class.tslib_pagegen.php :(
1. Стоит ли патчить?
2. Стоит ли патчить если стоит пакет typo3_src?

void 25.12.2008 14:50

А как вам такое?)
http://validator.w3.org/check?uri=ht...Inline&group=0

Были где-то по этому поводу обсуждения и даже патч висел... Правда, не помню, чем закончилось

hlor 25.12.2008 16:52

В последней типо3 4.2.3 CSS styled content 0.4.0 более корректен. В <BODY> ошибок нет.
А пропатчить можно и самому, там код достаточно прозрачен. Чем я сейчас и займусь. Патч выкладывать?

hlor 25.12.2008 21:40

Рано я похвалил CSS styled content :( он все ж ставит тэги типа <foo />. Проверка валидатором проходит в зеленом, хотя и с предупреждениями, но FF все равно остается в режиме совместимости...

ЗЫ: эта страница по мнению лИса: "Режим соответствия стандартам"


Часовой пояс GMT +4, время: 00:52.

Работает на vBulletin® версия 3.8.1.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot