[TYPO3-dev] TYPO3 4.2: Tables in content elements break backend layout
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Mon Mar 17 12:16:03 CET 2008
Steffen Kamper schrieb:
> "Martin Kutschker" <Martin.Kutschker at n0spam-blackbox.net> schrieb im
> Newsbeitrag
> news:mailman.1.1205750820.14415.typo3-dev at lists.netfielders.de...
>> Steffen Kamper schrieb:
>>> Can you explain what this expression does?
>>> $content = preg_replace('/(<[^ >]* )([^ >]*)([^>]*>)(<\/[^>]*>)/',
>>> '$1$2$3$2$4', $content);
>> Match a tag without content and use the first attribute as content:
>>
>> 1. match the the tag together with the opening < and a space (!) after the
>> tag name
>> 2. match the first attribute (unless it contains a space!?!)
>> 3. match the rest of the opening tag
>> 4. match the closing tag
>>
>> Probably meant for LINK tags.
>>
>> Masi
>
> thx Masi for explanation. I have to test this out of TYPO3 to see why it
> fails with the tables.
The expression shouldn't match for a table.
But it will match <tag something="foo bar" etc></anothertag> and will
return <tag something="foo bar" etc>something="foo</anothertag>.
Masi
More information about the TYPO3-dev
mailing list