[TYPO3-50-general] corrupted chars in DebugExceptionHandler

Robert Lemke robert at typo3.org
Mon Oct 12 10:00:17 CEST 2009


Hi Steffen,

Am 11.10.2009 um 15:47 schrieb Steffen Kamper:

> as we use a backported error- and exceptionhandler in v4, i stumbled
> about corrupted chars in DebugExceptionHandler::getBacktraceCode
>
> $preparedArgument = (strlen($argument) < 80) ? $argument :
> substr($argument, 0, 40) . '…' . substr($argument, -40);
> $preparedArgument = htmlspecialchars($preparedArgument);
> $preparedArgument = str_replace("\n", '<span
> style="color:white;">�</span>', $preparedArgument);
> $arguments .= '"<span style="color:#FF8700;">' . $preparedArgument .
> '</span>"';
>
> It's corrupted in FLOW3 as well.

It's not broken in FLOW3 because all FLOW3 code is utf-8 encoded, all  
output is utf-8 as well so using utf-8 characters is perfectly okay.

But using the HTML entities like Rupi suggested is of course fine.

Cheers,
robert


More information about the TYPO3-project-5_0-general mailing list