[TYPO3-core] RFC #7984: Bug: stdWrap.crop now closes opened tags and counts chars correctly

Christian Kuhn lolli at schwarzbu.ch
Mon Aug 18 20:23:12 CEST 2008


Hi!

Dmitry Dulepov [typo3] wrote:
> Hi!
> 
> Jochen Rau wrote:
>> thanx for your response. I have no problem with your point of view. 
>> You can integrate it in 4.3 or not if you like. I can cope with all 
>> the situations ;-)
> 
> I came across this feature because I need it in my own project.
> 
> There was a lot of discussions about this feature. Since no one did any 
> changes to Joshen's code, I propose to use his code for 4.3 and forget 
> the discussion about entities as rare case for rare encodings.
> 
> I propose to impement this feature as new "cropHTML" property. It is to 
> be called before the "stripHTML" property.
> 
> The patch is attached.

+1 to get cropHTML as new feature into 4.3.

+1 on testing. I did not dig into the regexes and am unable to give a +1 
on reading / rewiewing because of this.

The function documentation should be updated, (Implements the stdWrap 
property "cropHTML").

I am not sure if the crop to the nearest space always works. I think I 
found a problem here (with nested html tags?), but I am unable to 
reproduce this. Please do some further tests in this direction.

Apart from that I just tested this with my tt_news blog setup and the 
patch seems to works like a charm.


Hint: This patch can be tested very simple with a html content element 
and some TS like

tt_content.html {
   stdWrap.cropHTML = 20 | ... | 1
}


Many thanks to all of you for this cool feature,
Christian


More information about the TYPO3-team-core mailing list