Project

General

Profile

Actions

Bug #63086

closed

Wrong count in format.crop ViewHelper

Added by Ludwig Rafelsberger over 9 years ago. Updated over 5 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-…

Actions

Also available in: Atom PDF