[TYPO3-core] Fix issue 2365 in t3lib_parsehtml_proc

Bernhard Kraft kraftb at kraftb.at
Tue Feb 7 22:44:04 CET 2006


Stanislas Rolland wrote:
> Hi,
> 
> Could I have concurrence with this simplified version of this patch, please.

> +						$blockSplit[$k]=str_replace(chr(10),' ',$this->transformStyledATags($blockSplit[$k])).$lastBR;

I am quite fine with the patch. It didn't cause any syntax error and as at the end a newline
is added I'm ok to remove all newlines out of tags.

But rather you do:

str_replace(chr(10), ' ', str_replace(chr(13), ' ', $val))

or

preg_replace('/['.preg_quote(chr(10).chr(13)).']/', ' ', $val)

as chr(13) could also occur in parsed HTML templates and would get interpreted
as newline on MAC (OSX?) (you should know that Kasper is a Mac user since some time
and will surely test T3 on macs ! :)


And I had quite some problems testing it cause the only way I tought to test parsehtml_proc
was saving in the RTE. But sadly you own extension rtehtmlarea XCLASSes this file/method and
isn't doing the str_replace itself :)

But anyhow:
+1 after chr(13)


greets,
Bernhard



More information about the TYPO3-team-core mailing list