Yes, it will encode any HTML entities into their entity form, which may break some database operations if it relies on raw entities.
If you are displaying it, only use:
If you are placing it into a database query:
- mysql*_real_escape_string().
A simple notice is if you strip slashes without them being required to be stripped, you may destroy data (if a slash is contained in a password, or an external document for example). It is only required on database operations if Magic Quotes (
magic_quotes_gpc) is turned on, which will add quotes automatically (thus breaking _
real_escape_string)
Edited by Alexander, 24 June 2010 - 08:01 PM.
Be sure to read the updated
FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us
why or
what errors occurred.