Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: HTML::Entities not encoding @ or .

by punch_card_don (Curate)
on Feb 12, 2008 at 14:30 UTC ( [id://667574]=note: print w/replies, xml ) Need Help??


in reply to Re: HTML::Entities not encoding @ or .
in thread HTML::Entities not encoding @ or .

Yes, I took that advice to heart - using placeholders also. Is there some harm also encoding entities will cause?

Replies are listed 'Best First'.
Re^3: HTML::Entities not encoding @ or .
by Joost (Canon) on Feb 12, 2008 at 16:25 UTC
    Hmm.. if you're also using place holders or quote, it probably won't matter as far as security goes, but it does make it harder to search the database or interact with the DB using anything but your code (I tend to do quite a lot of inspecting using hand-written SQL during development).

    Oh and it'll take more space to encode everything (which may make certain columns unexpectedly too small if someone enters a character you're escaping).

    So it probably won't cause serious harm, it does IMO make it harder to develop and test. I wouldn't do it.

Re^3: HTML::Entities not encoding @ or .
by Errto (Vicar) on Feb 12, 2008 at 19:46 UTC
    Yes, if the output from your database ever needs to be anything other than HTML, you'll need to remember to decode it explicitly at that time. The best rule to follow, I've found, is to keep the raw text in the DB, then encode it appropriately at time of output, for the relevant output format in question.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://667574]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-03-28 18:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found