Issue Bug Closed

#22357cropHTML uses faulty reg exp for HTML entities

Ralf Hettinger 03/30/10, 20:35 updated 10/02/18, 12:25

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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.