J
J
Jundallah2018-07-27 01:13:47
SQL
Jundallah, 2018-07-27 01:13:47

How is it customary to store text in the database?

Tell us how it is customary to store text in the database, taking into account html tags? Is it accepted to use the raw html option, or are there some other options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2018-07-27
@Stalker_RED

If this is about texts from some wysywig editor or comments, for example, then the general approach is this:
1. save as is, do not cut anything
2. filter before displaying on the page
Sometimes you can filter at the input, but there are chances to ruin user data, which is not good in general.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question