Answer the question
In order to leave comments, you need to log in
How to store pieces of html code in the database?
If you store it as is, then most likely there will be bugs during migrations, or even when transferring from one database to another (we are talking about quotes of various kinds). Encode to htmlentities and then back? Or how in general?
Before that, everything happened through the BB parser (complete with WYSIWYG), I decided to get rid of it, I think how to store this whole thing now.
Answer the question
In order to leave comments, you need to log in
You can serialize the html template and put it in a text field
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question