Bug #63086

Wrong count in format.crop ViewHelper

Added by Ludwig Rafelsberger about 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Must have
Category:
-
Target version:
-
Start date:
2014-11-19
Due date:
% Done:

100%

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

Description

When cropping text containing HTML tags the format.crop ViewHelper does respect HTML tags (given proper arguments of course) when counting input data towards maxCharacters argument.
The problem comes with HTML tags that contain attributes made of formerly unusual characters: E.g. dashes, as extensively used by HTML5 data-* attributes.

<f:format.crop maxCharacters="7"><em>Foo</em> bar baz lorem</f:format.crop>

will correctly yield Foo bar… whereas

<f:format.crop maxCharacters="7"><em data-foo="x">Foo</em> bar baz lorem</f:format.crop>

will not properly match the em tag and print something along <em data-…

#1

Updated by Gerrit Code Review about 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34371

#2

Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34371

#3

Updated by Gerrit Code Review about 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34371

#4

Updated by Gerrit Code Review about 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34371

#5

Updated by Gerrit Code Review about 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34371

#6

Updated by Gerrit Code Review about 6 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34371

#7

Updated by Gerrit Code Review about 6 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34371

#8

Updated by Ludwig Rafelsberger about 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#9

Updated by Gerrit Code Review about 6 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34406

#10

Updated by Ludwig Rafelsberger about 6 years ago

  • Status changed from Under Review to Resolved
#11

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF