and I want this data in the Sqlite3 DB preserved when it is displayed the HTML table:
“Spring Rolls - 4 per serve”
I have tried: “\n” and “br” in angle brackets with and without a trailing " /" but the line-feed is not preserved and the text is printed the table cell as literal instead of behaving as a control character.
<td>Spring Rolls<br>- 4 per serve</td> renders as your example. Perhaps you could show the code you’re using to substitute a br tag for the line break?
Ah . . I see what you mean - I have not coded anything specifically - I thought that that would not be necessary and that what I want to do should be already able to be done with some existing facility . .
As I said in the OP, the data is in a Sqlite DB and the relevant field looks like:
Try using the simple_format helper. That will (among many other things) convert a newline into a tag. It will also convert two newlines into a paragraph break, wrapping everything before the two newlines in a P tag, and closing off at the \n\n and starting a new paragraph.
The key to using this is to not have any HTML in your database, just plain text. Running HTML through simple_format would probably make a mess of it.