Status/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): Nando Breiter / Nando Breiter (Nando Breiter)
Created: 09/12/2013
Versions: 10.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: Final /
Priority/Frequency: Normal / All users will encounter
Locale/System: English / Mac All
Vote Count: 0
Problem Description:
cfdump display is broken under certain conditions.
Steps to Reproduce: Unzip the attached simple templates and alter the query in test.cfm to work in your environment. Browse to test.cfm and cfdump works as expected. Browse to testDump.cfm and cfdump's display is broken. The reason seems to be that whitespace is being stripped from the output using the regex REReplace(renderedContent, "[[:space:]]{2,}","","ALL"). Because there are errant consecutive spaces in the the dump.cfm template, optimally stripping whitespace from ColdFusion's output breaks the display. See below for an example copied from view source in the browser:
<tdstyle="cursor:pointer;" title="click to collapse" onClick="cfdump_toggleRow_qry(this);" class="query">
It could be argued that the developers need to be careful when stripping whitespace, in other words they should make their regex's less than optimal to make sure code is never collapsed. But it could also be argued that this would be a very simple fix and cfdump shouldn't be so fragile.
To fix this, I believe someone just needs to open the source template of dump.cfm and repetitively search and replace all instances of 2 consecutive spaces with one space until no space-space instances are found. That should prevent any regex that strips whitespace from collapsing code together and thereby breaking functionality. Missing semicolons in the CSS or Javascript sections might also create problems here.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3630936
External Customer Info:
External Company:
External Customer Name: Nando Breiter
External Customer Email:
External Test Config: My Hardware and Environment details: I have CF 10 installed on a Mac OSX 10.7.5 as my dev machine, and it is patched to Update 11. I have not tested this on other versions of CF.
Attachments:
- September 12, 2013 00:00:00: 1_testDump.zip
Comments: