Best practice for storing HTML coming from text fields to a database?

Posted by user1767270 on Programmers See other posts from Programmers or by user1767270
Published on 2013-06-25T19:51:14Z Indexed on 2013/06/25 22:28 UTC
Read the original article Hit count: 411

Filed under:
|

I have an application that allows users to edit certain parts of text and then email that out. My question is what is the best way to store this in a Microsoft SQL Server database. Right now I have two tables, one holding the HTML data and one holding the plain text data. When the user saves the info, it replaces newlines with br's and puts it in the HTML-conntaining table and then puts the regular text in the other table. This way the text box has the newlines when they go to edit, but the table that contains the HTML data, has the BR's. This seems like a silly way to do things. What would be the best practice? Thanks.

© Programmers or respective owner

Related posts about html

Related posts about sql-server