Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: break line

$
0
0

Because you're dumping the object rather than outputting it.

 

Try <cfoutput>#TheText#</cfoutput>

 

Here's the technical.

 

Even though 'John<br>Doe' looks like HTML to you, it is nothing more than a string to ColdFusion.  Text has a mime type of 'text/plain', which the browser iterprets as the actual value itself (John<br>Doe).  So ColdFusion is showing you the actual value of that variable.  Nothing has been output to the buffer for processing.  In order for ColdFusion to output the value of the variable to the buffer so that the browser can attempt to interpret it, you'll need <cfoutput>

 

Also, this is not a healthy way of writing code (mixing text and HTML).  Browsers do a VERY forgiving job of interpreting what you output as best as they can, but if you're going to output HTML, then wrap the output in the appropriate paragraph tag, ie:

 

<cfset example = '<p>John<br>Doe</p>' />

<cfoutput>#example#</cfoutput>


Viewing all articles
Browse latest Browse all 21760

Trending Articles