July 22nd, 2011, 05:55 PM
Join Date: Jul 2011
Time spent in forums: 37 m 29 sec
Reputation Power: 0
Replace /n with <br>, but only once...
Hi All, Developed some code to enable users to edit a webpage. Newlines are replaced with <br>. It works fine the first time. The problem is that the users can come back and update their comments - using the code below. And for some reason I end up with double <br> <br>. and probably triple on the next edit, etc. Any thoughts?
Thanks in advance,
Comments = <cfif Len(Trim(Form.Comments)) GT 0>
'#ReReplace(Form.Comments, "\n", "<br>", "ALL")#'
ReportNumber = #ReportNumber#