[TYPO3-dev] XHTML compliant ?!

x3n x3n at molinier.eu
Thu Nov 9 18:31:10 CET 2006



Christopher Torgalson a écrit :
> On 11/9/06, x3n <x3n at molinier.eu> wrote:
>> Hello everybody,
>>
>> I'm curently developing a frontend extension that displays ordinary
>> HTML. It's quite simple and be be summed up in one line : return my_page.
>>
>> However I'm faced with an annoying problem. Somewhere in my HTML page, I
>> there is a select box, with a default choice. The code looks like :
>>         <option name="toto" selected>
> 
> Martin is correct; in xhtml, all attributes must have a quoted value
> (even if it's an empty string).

Actually, you are write. I was mistaken because the validator of w3.org
allows it for XHTML Transitional.

> 
>> This code is compliant to XHTML Standards. It's summarized, but it
>> doesn't matter. So, I was expecting to have a compliant output on my
>> frontend, but it's not. I don't know why, but the selected is modified
>> in selected="", which is no longer compliant...
>>
>> Do you have any clue why typo3 is modifying those markup ?
> 
> I'd say the probability is 99.5% + that what you are seeing in the
> source has nothing to do with TYPO3. When you view the source in many
> browsers, you do /not/ see the exact code sent by the webserver...
> 
I don't know about that, but the validator.w3.org points out the mistake.

Anyway my problem is finally solved, changing my source HTML into XHTML
Strict... So now I have selected="selected". My output is now XHTML Strict !


Thanks for your responses,

Lionel




More information about the TYPO3-dev mailing list