Return to v1.4.5 docs

simpleFormat()



Replaces single newline characters with HTML break tags and double newline characters with HTML paragraph tags (properly closed to comply with XHTML standards).

Name Type Required Default Description
text string Yes The text to format.
wrap boolean No true Set to true to wrap the result in a paragraph.
<!--- How most of your calls will look --->
#simpleFormat(post.bodyText)#

<!--- Demonstrates what output looks like with specific data --->
<cfsavecontent variable="comment">
	I love this post!

	Here''s why:
	* Short
	* Succinct
	* Awesome
</cfsavecontent>
#simpleFormat(comment)#
-> <p>I love this post!</p>
   <p>
       Here''s why:<br />
	   * Short<br />
	   * Succinct<br />
	   * Awesome
   </p>