Project

General

Profile

Actions

Bug #30005

closed

stdWrap.cropHTML wrong on full-word crop shortly inside HTML-element

Added by Stefan Neufeind about 13 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2011-09-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.6
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When using full-word crop (don't within a word) and when inside a HTML-element (like description of a link) the function fails on the first word.

Testcase (for tests/typo3/sysext/cms/tslib/class.tslib_contentTest.php):

$charset . ' text with full-word-crop shortly inside html-element 26|...|1' => array(
'26|...|1', 'Some text with a link to <a href="mailto:">my email-address</a> and text after it', 'Some text with a link to <a href="mailto:">...</a>', $charset
),

Actual result (inside link): m...
Expected result: ...

If you raise the limit to 27 (include full word "my") or 28 (word and space after it, space gets cropped correctly) everything is fine. But when the first word itself is not full it should leave out that word completely.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #26915: stdWrap.cropHTML does not recognize TYPO3 link attribute correctly (and removes text around)Closed2011-05-19

Actions
Actions #1

Updated by Alexander Opitz almost 10 years ago

  • Status changed from New to Needs Feedback
  • Is Regression set to No

Hi,

as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.7)?

Actions #2

Updated by Riccardo De Contardi over 9 years ago

Tested with 6.2.12:

page.1 = TEXT
page.1.value (
Welcome blah blah blah on email <a href="mailto:email.address@example.org">email.address@example.org</a> blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
)

Test n.1:

page.1.cropHTML = 20|...|1 

Result: Welcome blah blah...

Test n.2:

page.1.cropHTML = 50|...|1 

Result: Welcome blah blah blah on email email.address@exam... (the link is respected and full working)

Test n.2:

page.1.cropHTML = 80|...|1 

Result: Welcome blah blah blah on email blah blah blah blah...(the link is respected and full working)

Is this sufficient?

Actions #3

Updated by Mathias Schreiber over 9 years ago

  • Status changed from Needs Feedback to Closed
Actions

Also available in: Atom PDF