If I do something like this in ColdFusion:
<cfoutput>foo="#foo()#"</cfoutput>
The resulting HTML has a space in front of it:
foo=" BAR"
However, if it is not a function call it works fine, i.e.:
<cfset fooOut=foo() />
<cfoutput>foo="#fooOut#"</cfoutput>
Gives this output:
foo="BAR"
Where is this extra space coming from and is there anything I can do about it?
Edit To clarify, the space is not in the value returned by my foo
function:
<cffunction name="foo" access="public" returntype="string">
<cfreturn "BAR" />
</cffunction>
But I've also found that this doesn't happen with built-in functions, i.e.:
<cfoutput>"#UCase("bar")#"</cfoutput>
Prints:
"BAR"
However, it does happen if I pass the output of my function to the built-in function (this part makes no sense to me). i.e.:
<cfoutput>"#UCase(foo())#"</cfoutput>
Prints:
" BAR"