Bug #28741
closedstdWrap.cropHTML does not respect line breaks
100%
Description
Crop does not work for a number of character after a line break.
TypoScript:
page = PAGE page { 10 = TEXT 10 { value ( Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo <span>ligula eget dolor. Aenean massa.</span> Cum sociis natoque penatibus et magnis dis parturient montes, nascetur. ) cropHTML = 20 | ... } }
Example 1 (correct):
cropHTML = 20 | ...
Expected:
Lorem ipsum dolor si...
Output:
Lorem ipsum dolor si...
Example 2 (not correct):
cropHTML = 66 | ...
Expected:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean...
Output:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit....
Updated by Jigal van Hemert over 13 years ago
- Status changed from New to Accepted
It looks like a problem with the regular expression which doesn't see line breaks as normal whitespace characters. Maybe the function needs to do some whitespace contraction before cropping (just like a browser combines series of various whitespace characters into a single space)?
Updated by Gerrit Code Review almost 12 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18219
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/19499
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/19500
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at https://review.typo3.org/19501
Updated by Alexander Stehlik over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 207ddf38d92ff66744104dc149c5eb4c7a709d42.