[TYPO3-core] RFC: Bug #5841: parseFunc tags.XXX for single tags doesn't work
Ernesto Baschny [cron IT]
ernst at cron-it.de
Mon Aug 6 12:23:33 CEST 2007
Thorsten Kahler wrote: on 06.08.2007 12:07:
> Hi Ernesto,
> Ernesto Baschny [cron IT] wrote on 06.08.2007 11:57:
>>>>> Ernesto Baschny [cron IT] wrote: on 22.06.2007 17:17:
>>>>>> Problem: parseFunc "tags" doesn't work if the tag is a single tag which
>>>>>> has attributes. E.g. the following:
>>> Any new on this? Was I too dumb?
>> Heh, no. I haven't had time to improve my example scenario, but in the
>> meantime I have discovered a bug in my patch. An improved version is
>> being used in production on several sites which need the "click-enlarge
>> in RTE" functionality, and I am still observing if it doesn't break any
>> other thing. As soon as I have some time, I will reopen the issue with a
>> better example and the (hopefully) bug-free fix.
> could you please post your current version here in the meantime?
> I hit a similar problem when I tried to parse single tags /without
> attributes/ for a XML ouput. Your previous patch didn't work here either.
> I'd be glad to test your patch and send feedback though the specific feature
> in that project was stalled by now.
The problem I encountered was that it is difficult to differenciate a
single tag (ends with "/") and a open/close tag in a TYPO-tag, which is
E.g. this is valid for parseFunc processing:
but of course this is not XML. And the ending "/" in the opening <link>
makes it very difficult to differenciate that from a single tag with
<img src="..." /> ...
This was broken with the previous patch (v2), as it broke all links
which ended with "/".
In the new patch (attached, as v3) I do that with a regexp which expects
at least one space before the closing "/".
Parsing single tags without attributes should have been possible with
standard TYPO3 if the "/" is glued with the tag name:
a) <br/> -> works because the "/" is the end of $tag
b) <br /> -> doesn't work, because "/" is in $tag
Variant b) might work with my patch, I haven't tested. Thorsten, your
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 921 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070806/da8ea67d/attachment.diff
More information about the TYPO3-team-core