Im not sure if this is the right place, but it would be a good feature
for coldbox, if you could specify in the coldbox.xml.cfm the following
things:
parameters for <cfprocessingdirective pageencoding="utf-8"
suppresswhitespace="true"> tag,
so coldbox automatically wraps all layout+views in this tag.
maybe an optional cleanhtml / removewhitespace setting, which used a
method like this to clean layout+view:
<cfscript>
/**
* Replaces a huge amount of unnecessary whitespace from your HTML
code.
Was there a whitespace problem with coldbox-native methods? Im not
sure im talking about that, was more talking about removing whitespace
anywhere, also in my code for example.
So basically, you can just create an interceptor that executes at preRender and cleans your html to be rendered. If you do, please contribute it to the code depot.
I am not sure what removes the line breaks from the layouts in ColdBox, but it can causes issues with single-line javascript comments. Chrome gives an “Uncaught SyntaxError: Unexpected end of input”. Unless you view the source code, or experiment commenting code out it can be difficult to pin-point the cause; the error message is not very helpful.