Skip to content

[ErrorHandler] Code highlighting on PHP 8.3 is broken on rendered exception pages #57354

@tscni

Description

@tscni

Symfony version(s) affected

7.1.1

Description

PHP 8.2:
image

PHP 8.3:
image

How to reproduce

Throw an exception on PHP 8.3 and make sure that the error handler catches and renders it on an HTML page.

Possible Solution

In #51586 the rendering code was changed to replace all spaces with  , even those within HTML tags. That ultimately breaks the rendering.

I quickly tried to remove that replacement, change .trace-code li code to use white-space: pre; and change the final trim() to rtrim(), but the result is not quite sufficient:
image

Presumably something in the multiline splitting logic needs to be adjusted.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy