Bug #22471
closedAutomatic line breaks in GIFBUILDER occur after characters like ' % ...
0%
Description
problems with regexp in
protected function getWordPairsForLineBreak($string)
in file class.t3lib_stdgraphic.php
$wordsArray = preg_split('#([ -.,:]+)#', $string, -1, PREG_SPLIT_DELIM_CAPTURE);
should probably be
$wordsArray = preg_split('#([ \-.,:]+)#', $string, -1, PREG_SPLIT_DELIM_CAPTURE);
#([ -.,:]+)#
the dash should be escaped otherwise it matches all characters between Space and dot like ! " # $ % & ' ( ) * + , - .
to reproduce it - just i.e. print_r(&wordsArray) and use one of the characters above in Gifbuilder (for example d'Artagnan).
(issue imported from #M14132)
Files
Updated by Jack Skaba over 14 years ago
this is just a reminder or a question - is there anything wrong with the description of the problem or the solution? If yes, I'm more than willing to explain it in detail. If not - could someone please put that one backslash into svn to solve that bug :) .
Updated by Stefan Neufeind over 13 years ago
Checked against 4.5.2. Patch seems to be at least in that branch already. Resolved? Or might it still need backporting to other branches?
Updated by Jigal van Hemert over 13 years ago
Committed to trunk (that was 4.4) in rev 7939 by Susanne on 16-06-2010 21:34.
Issue wasn't closed by mistake. Fix is present in 4.4.0-RC2 and later.