Issue Bug Closed

#22471Automatic line breaks in GIFBUILDER occur after characters like ' % ...

Jack Skaba 04/15/10, 21:48 updated 10/02/18, 12:23

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)

Reviews 0

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