BFreshour
Programmer
- Mar 20, 2002
- 84
Code:
I currently have a forum written in ColdFusion using a SQL 2000 database. I'm storing the post as 'Text' with a length of 16. Whenever display the post back to the user I'm using #ParagraphFormat(PostBody)# which works great. However if the user enters information such as:
1
2
3
4
The post is played as "1 2 3 4" instead of:
1
2
3
4
The problem has to deal with the ParagraphFormat function in ColdFusion. It doesn't support single line breaks becase it doesn't know if the next line is a new paragraph or part of the previous one. Is there ANYWAY to do a find/replace on the PostBody and replace any CRLF with a <br> since HTML is allowed in my forums?
Thanks in advance.
Note: If the user enters two carriage retuns between a list, such as:
1
2
3
4
it comes out looking just like they put it in.