Why is ColdFusion adding whitespace when I put the output of a function in a string?
Posted
by Kip
on Stack Overflow
See other posts from Stack Overflow
or by Kip
Published on 2010-05-07T21:34:09Z
Indexed on
2010/05/07
21:38 UTC
Read the original article
Hit count: 145
coldfusion
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?
© Stack Overflow or respective owner