If have a field in my database with crlf’s how do I preserve that in HTML??
Is there a standard way of doing this??
Malcolm
EDIT: I am actually doing an MVC app if that hepls.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think the best way to do that is to replace the
\r\nsequence with<br />tags, using whatever scripting language your database-backed website is in.Other options include placing the text within a
<textarea>. Or, if it is appropriate for your site, using akin to the<pre>tag (or the CSS attributewhite-space: pre).