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

Jochen Rau j.rau at web.de
Thu Apr 3 22:46:03 CEST 2008


This is an SVN patch request.

Type: Bugfix

Bugtracker references: http://bugs.typo3.org/view.php?id=7984

Branches: TYPO3_4-1, TYPO3_4-2 and trunk

Problems:
1) After stdWrap.crop has cropped text opened tags are not closed. This 
leads to unvalid HTML-code and strange FE-rendering.
2) stdWrap.crop counts chars of tags in text. This leads to shorter 
visible cropped text in FE.
3) stdWrap.crop counts chars of HTML-entities instead of the represented 
char (see 2)).

Solution:
In the proposed solution the content is splitted into an array. This 
array is parsed and each openen tag gets closed. Tags are not counted 
and HTML-entities are decoded before strlen is determined.

Notes:
In the proposed solution cropping at the last white space (to avoid 
broken words) can not "slide" over a tag.

Greetings
Jochen Rau
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug_7984_typo3_4-1-6.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080403/314e512e/attachment.txt 


More information about the TYPO3-team-core mailing list