tracker issue : CF-4205110

select a category, or use search below
(searches all categories and all time range)
Title:

Default error template doesn't handle line breaks correctly in error message and detail

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): Bradley W. / ()

Created: 09/05/2019

Components: Debugging

Versions: 2018

Failure Type: Data Loss

Found In Build/Fixed In Build: Final /

Priority/Frequency: Normal /

Locale/System: / Platforms All

Vote Count: 0

Consider the following line of code:

throw( message="my #chr(10)# message", detail="my #chr(10)# detail" );

The default error template in Lucee Server correctly shows line breaks when outputting the above exception message and detail.  Adobe CF however eats the line breaks and they do not show on the page.  This sucks for when you want to include several lines of information in the error detail and have it still be readable on the screen.  Please respect actual line breaks in my error message and detail.

Furthermore, consider the following code:

throw( message="my <br> message", detail="my <br> detail" );

Again, Lucee Server correctly encodes all HTML and displays the error message and detail EXACTLY AS I TYPED THEM on the screen.  Adobe CF instead obeys the embedded HTML and inserts a line break!  What?? Please don't do this.  If I put a <br> in my error message or detail, I expect it to be output like that.  Don't make assumptions about what I want.  Also, parsing HTML is silly as the same error message and detail may also be sent to log files, databases, or external logging software that does not expect any HTML to be parsable.

Attachments:

Comments: