NYCPHP Meetup

NYPHP.org

[nycphp-talk] Re: New PHundamentals Article

John Lacey jlacey at att.net
Mon Jan 5 13:59:58 EST 2004



Chris Shiflett wrote:

> --- John Lacey <jlacey at att.net> wrote:
> 
>>>There are also two different opinions on this:
>>>
>>>1. Perform htmlentities() prior to storage.
>>>2. Perform htmlentities() prior to display.
>>>
>>>The first can be better if you must display data in HTML very often.
>>>Rather than perform htmlentities() every time, you can just pull
>>>straight from the database. 
>>
>>FWIW, I believe data should be "display-agnostic" for want 
>>of a better term. Keeping it "raw" is, in my opinion, the 
>>way to handle stored data.
> 
> 
> Yes, and this is why some people argue for case 2. However, believe me
> when I tell you that once you are having to fetch and display this data
> millions of times a day, you might find yourself being a bit more
> open-minded. :-)
> 
> I think it's best to choose whichever approach is appropriate for the
> situation.


The nice thing about 30+ years in the computer business is 
that I don't feel I have to be right all the time.

J






More information about the talk mailing list