Project

General

Profile

Actions

Bug #22357

closed

cropHTML uses faulty reg exp for HTML entities

Added by Ralf Hettinger over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2010-03-30
Due date:
% Done:

0%

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

Description

The very sweet feature stdWrap.cropHTML uses a faulty regular expression (i.e. search pattern) for treating encoded HTML entities as a single character, which is supposed to avoid cropping in between such entities.

The search pattern as used in the current preg_match currently always crops after the first semicolon and won't recognize entites reliably.

Attached patch fixes the problem; the code still needs to be simplified and tested though (ToDo: keep the search pattern in a variable and test it - I'm just short in time right now).

(issue imported from #M13972)


Files

0013972_4.4-rev7223.patch (1.33 KB) 0013972_4.4-rev7223.patch Administrator Admin, 2010-03-30 20:38
0013972_4.4-rev7370.patch (1.51 KB) 0013972_4.4-rev7370.patch Administrator Admin, 2010-04-15 13:45
issue_13972_v3.diff (5.4 KB) issue_13972_v3.diff Administrator Admin, 2010-04-15 15:01
issue_13972_v4.diff (5.4 KB) issue_13972_v4.diff Administrator Admin, 2010-04-16 23:32
Actions

Also available in: Atom PDF