...

View Full Version : Removing slashes from <p>.



RiskyShenanigan
11-09-2011, 02:49 PM
I currently have a <p> and am trying to remove the slashes on characters ', it keeps appearing with \', do I need to encode that someone to the database?

BTW, the text is being retrieved from a database?

Thanks.

abduraooft
11-09-2011, 03:02 PM
I think you are not aware of magic_quote_gpc setting under PHP. Have a look at http://www.codingforums.com/showthread.php?p=711327#post711327 or http://php.net/manual/en/security.magicquotes.php

sunfighter
11-09-2011, 04:19 PM
I am under the impression that magic quotes are depreciated and turned off in php 5 and that addslashes() and stripslashes() are to be used.

Fou-Lu
11-09-2011, 04:51 PM
I am under the impression that magic quotes are depreciated and turned off in php 5 and that addslashes() and stripslashes() are to be used.

magic quotes was the most terrible idea ever created. One should always treat it as if it does exist, and correct it as necessary.
Best I know the default configuration is (and always has been) on. It is deprecated in 5.3, but I don't have hopes for it to be gone in 6.x. I'm happy enough that regiser globals are now gone, we need to approach it one step at a time.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum