Re: Character Entity References
- From: "Mark A. Boyd" <lingoboyd@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 30 Mar 2008 16:58:01 GMT
Michael Fesser <netizen@xxxxxx> posted in comp.lang.php:
.oO(George Maicovschi)
The problem starting with escaping the input data using htmlentities()
and from my point of view, escaping data before it goes to the DB is a
rather good thing not a bad one.
Escaping yes, but not in this way. Data in a DB should never be stored
in an output-specific or media-dependent encoding, but in a raw format.
Pure data, nothing else. Just think about things like
* output to something else than HTML, for example a PDF or a plain text
newsletter
* a fulltext search
Both tasks will be almost impossible or at least much more complicated
with HTML data in the DB, but pretty easy to do with raw data.
You, Jerry, and others espouse this idea and I certainly understand the
merits. But it leaves me with a question.
How do you deal with display data that may be required in both HTML and/or
PDF? ie: italic word(s) within the data.
My current solution is storing the <em> tags in the DB, but I don't really
like it for the very reasons you stated.
--
Mark A. Boyd
Keep-On-Learnin' :)
.
- Follow-Ups:
- Re: Character Entity References
- From: Jerry Stuckle
- Re: Character Entity References
- From: Alexey Kulentsov
- Re: Character Entity References
- References:
- Character Entity References
- From: ft310
- Re: Character Entity References
- From: Michael Fesser
- Re: Character Entity References
- From: Jerry Stuckle
- Re: Character Entity References
- From: Michael Fesser
- Re: Character Entity References
- From: George Maicovschi
- Re: Character Entity References
- From: Michael Fesser
- Character Entity References
- Prev by Date: Re: Form helper issues "Invalid argument supplied for foreach()"
- Next by Date: Cheap Wholesale all NIKE.shox.Air max.AF1.TN.Jordan.shoes.Apple Ipods Nano, Xbox 360, Sony PS3, Sony PSP.wii.all laptops http://www.new-nikeshoes.cn
- Previous by thread: Re: Character Entity References
- Next by thread: Re: Character Entity References
- Index(es):