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

Jochen Rau jochen.rau at typoplanet.de
Mon Aug 31 11:05:45 CEST 2009


Hi.

Felix Oertel wrote:
> if I crop after 74 just the header is displayed, after 75 the picture
> and the next paragraph are displayed. (using Jochen's exmaple HTML)
>
> The problem is Steffen and mine PHP (5.2.x) allways finnishing the last
> tag instead of cropping it's content.
>
> example:
> <p>foo bar</p>
>
> cropHTML = 3 | ... | 0 should return:
>
> <p>foo ...</p>
>
> but returns:
>
> <p>foo bar ...</p>

I fixed that issue. The reason was to use utf-8 support of preg_match 
(modifier "u") on an iso-8859-1 string. The string to be cropped is now 
temporarily converted into utf-8. In addition, cropHTML supports now all 
charsets of TYPO3.

I also added the revised unit tests with a nice trick to test different 
charsets. To run these tests you have to install the latest version of 
EXT:phpunit and apply the patch provided in

http://forge.typo3.org/issues/show/4382

You find all necessary patches attached.

Regards
Jochen




-- 
Every nit picked is a bug fixed

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_7984_v7_typo3_src-trunk.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090831/360e4d77/attachment-0002.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug4382_v1.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090831/360e4d77/attachment-0003.txt 


More information about the TYPO3-team-core mailing list