flow-development-collection icon indicating copy to clipboard operation
flow-development-collection copied to clipboard

BUG: Web-Exception messages, preserve whitespace (ASCII Art)

Open mhsdesign opened this issue 3 years ago • 0 comments

before: image

after: image

Exceptions which have multiple spaces in their $message where previously not as expected displayed. Exceptions outputted to the CLI or logged did preserve multiple whitespaces naturally, but since they are collapsed in HTML by default, they are not shown in the browser.

It was not possible to really work around this since the htmlspecialchars() would disarm an injected <pre> tag and using nonspeaking spaces as unicode "\u{00A0}" where logged unreadable and without monofont, the spaces don't take up as much space like expected in the CLI or log.

Displaying all exceptions in pre is something which could potentially harm readability. so 'normal' messages without multiple following spaces should not be changed.

mhsdesign avatar Feb 06 '22 22:02 mhsdesign