[TYPO3-english] Typo3 strange html "repair"
Pero Matic
pero at matic.com
Fri Oct 30 00:25:20 CET 2009
Christopher Torgalson wrote:
> Hi,
>
> On Thu, Oct 29, 2009 at 2:38 PM, Pero Matic <pero at matic.com> wrote:
>> Pero Matic wrote:
>>> Hi. I made some changes to one extension which returns piece of
>>> html. In that piece of html there is also this:
>>>
>>> <option value="1" selected="">Something</option>
>>>
>>> The problem is that my original $content value prior to return from
>>> extension class looks like:
>>>
>>> <option value="1" selected>Something</option>
>>>
>>> I made echo $content; prior to return from class so I know this for
>>> sure.
>>> Now, does anybody knows where this ="" (in front of selected) came
>>> from ??? Thx!
>>
>> It seem i found it.
>>
>> config.xhtml_cleaning = all
>>
>> is causing this.
>
>
> Provided the doctype of the page is some variant of xhtml, you will
> see the same in e.g. Mozilla-based browsers because <option value="1"
> selected> is invalid html. The correct form is <option value="1"
> selected="selected">. It looks slightly nonsensical, but in xhtml,
> attributes must be quoted, and may NOT be minimized [1]. The best fix
> is to alter your extension's output so that it produces valid (x)html.
Yep, i did that. Thx!
More information about the TYPO3-english
mailing list