Bug #18535
closed
support html-tags in crop function of stdWrap
Added by Typoheads GmbH over 16 years ago.
Updated almost 14 years ago.
Description
current text crop function doesn't take html tags in account.
example:
temp.mytext = TEXT
temp.mytext.field = text
temp.mytext.crop = 150|...|1
(possible) html output:
lorem ipsum dolor <b>sit amet...
needs a logical parsingfunction which closes open html-tags
(issue imported from #M7984)
Files
lorem ipsum dolor <b>sit amet...
The patch solves the decribed problem and ensures the correct char count (chars of tags ar not counted; entities are decoded).
fyi: bug_7984.diff against 4.2RC1
Added patch for TYPO3 4.1.6
The new patch (bug_7984_v2_typo3_4-1-6.diff) takes the "link" tag into account. Thanks to Boris for testing.
The new patch (bug_7984_v3_typo3_4-1-6.diff) solves a problem (no content was shown, if the number of chars is larger than the content length).
+1 after testing in 4.1.5
The new patch (bug_7984_typo3_4-2-0RC1.diff) closes cropped tags, respects entities and is unit-tested (CropTest.php). For plain text the patched version of crop behaves exactly as the original version.
Boris!
Please post this as a RFC to the core list!
Re-posted the patch to the core list. Now it uses cropHTML property.
So here we are one year later, and we have a 'relationship'.
Nice!
:-)
This was mainly to bubble the thing out again. I was a little bit exhausted after the lengthy discussion on the core list. But I am currently preparing a post to sum up the discussion. I really want this feature get into 4.3.
Also available in: Atom
PDF