tracker issue : CF-4127481

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

Whitespace stripped when output=true and cfoutput is outside function

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Joel Grimes / Joel Grimes (Joel Grimes)

Created: 03/10/2016

Components: Functions

Versions: 2016

Failure Type:

Found In Build/Fixed In Build: CF2016_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 2

Listed in the version 2016.0.01.298513 Issues Fixed doc
Verification notes: verified_fixed on September 29, 2019 using build 2016.0.01.298513
Problem Description:In a cf function with output="true", whitespace is stripped between output variables when the cfoutput is not inside the cffunction.

Steps to Reproduce:
<cffunction name="test" output="Yes" access="public" returntype="void" >
	<cfset a = "b" />
	#a# #a#
</cffunction>
<cfoutput>	#test()#</cfoutput>

Actual Result:

bb

Expected Result:

b b

Any Workarounds:

The only way this renders correctly in Coldfusion 2016 is to wrap the dynamic content inside the function with cfoutput tags.

<cffunction name="test" output="Yes" access="public" returntype="void" >
	<cfset a = "b" />
	<cfoutput>#a# #a#</cfoutput>
</cffunction>
<cfoutput>	#test()#</cfoutput>

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4127481

External Customer Info:
External Company:  
External Customer Name: Joel Grimes
External Customer Email:  
External Test Config: This is on a windows development server.

Attachments:

Comments:

Our legacy code base contains countless examples of this type of function. Imagine the dynamic output is a list of classes on an HTML element. Without the space between class names css and js references no longer work. It would be impossible for us to refactor our code base to address this issue when the problem lies with the core application server.
Comment by External U.
3297 | March 10, 2016 04:59:49 PM GMT
This issue is fixed now. The fix will be available as part of upcoming update of ColdFusion 2016.
Comment by Nimit S.
3298 | March 27, 2016 05:58:47 AM GMT
This issue is fixed. I have verified it on build #298212.
Comment by Nimit S.
3299 | March 27, 2016 05:59:07 AM GMT
Hi Adobe, I've verified this is fixed in CF2016 Update 1 (build 2016.0.01.298513). Thanks!, -Aaron
Comment by Aaron N.
31445 | September 29, 2019 12:12:07 AM GMT