Is it wrong to put HTML in a database field?

Are you putting html into the database incorrectly?

e.g. PayPal buttons ...

or block text with a couple of line breaks?

+3
source share
5 answers

The problem is not whether to put this in the column of the table or not, but how it accompanies your application for updates, data retrieval, etc. You must be the judge of this, but of course it is not uncommon.

+1
source

, , . HTML- - , ; . , : , HTML. , HTML- Qaru .

, , HTML , , ; , - , , .

+1

, , HTML- , , , , , , html , , , .

0

(, , ), ; , javascript! , , (, ), HTML (, Markdown) .

, HTML- HTML ; , , ...

0

, , ""! XML, HTML.

, : A "/" B, , .

/ SPAN : <SPAN lang='fr'>yeux</SPAN> *, : <SPAN lang='en'>eyes</SPAN>. , , , - ( "oeil" ):

<EN>eye</EN> <phonetics>...</phonetics>, irregular pl. <FR>yeux</FR> <phonetics>...</phonetics>, <EN>eyes</EN>. And some more miscellaneous free-form text perhaps with some other embedded <FR> or <EN> words...

, <STRONG> <EM>, : - , / .

, MySQL , . :

- -, " " ...

- -, : "" INSERT INTO UPDATE s: , , HTML, ​​ ... , , . HTML Tidy , , , , "".

* By the way, such markup may not be for purely β€œcosmetic” purposes: if you index all these definition / explanation fields with an inverted index such as Lucene / Elasticsearch: mark all built-in French words and all English words like this, you you can do an inverted index search in a way that is completely impossible, if somehow you do not define the words of a certain "type" by some kind of "meta-information" mechanism, XML or HTML, etc.

0
source

All Articles