Skip to content

Whoops.cfm source code panel renders indentation as ◆◆◆◆ due to chr(20) instead of chr(32) #659

@edyionescu

Description

@edyionescu

What are the steps to reproduce this issue?

  1. Enable debug mode in config/ColdBox.cfc under the development() environment method:

    function development(){
      variables.coldbox.debugMode           = true;
      variables.coldbox.customErrorTemplate = "/coldbox/system/exceptions/Whoops.cfm";
    }
  2. Trigger any exception in the application to load the Whoops error template.

  3. Observe the source code panel in the rendered error page.

What happens?

The indentation in the source code panel renders as ◆◆◆◆ (replacement/unknown character symbols) instead of spaces, making the code panel appear cluttered and visually noisy.

What were you expecting to happen?

Proper whitespace indentation in the source code panel.

Any logs, error output, etc?

The root cause is in system/exceptions/Whoops.cfm around line 647. chr(20) (ASCII DC4, a non-printable control character) is used as the spacing unit instead of chr(32) (a regular space). The author likely confused decimal 32 with hex 0x20 (which are the same value), and mistakenly wrote chr(20) instead.

<!--- Add spacing for indentation --->
<cfset spacing = "#chr( 20 )##chr( 20 )##chr( 20 )##chr( 20 )#">

Fix: replace all occurrences of chr( 20 ) with chr( 32 ) in that file.

Any other comments?

This only affects the visual display of the Whoops error page - no functional or security impact.

What versions are you using?

Operating System: Windows 11 Pro 25H2
Package Version: 8.1.0+34

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions