Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jun 2011
    Posts
    49
    Thanks
    8
    Thanked 2 Times in 2 Posts

    Removing slashes from <p>.

    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.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I think you are not aware of magic_quote_gpc setting under PHP. Have a look at http://www.codingforums.com/showthre...327#post711327 or http://php.net/manual/en/security.magicquotes.php
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,096
    Thanks
    23
    Thanked 594 Times in 593 Posts
    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.

  • #4
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Quote Originally Posted by sunfighter View Post
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •