Menu

Remove Slashes?

Help
Jason Evan
2003-08-03
2012-09-19
  • Jason Evan

    Jason Evan - 2003-08-03

    Hello,

    When I receive results from the database, there are \ after ' and " , how can I easily remove them?  Is there a built-in fuction in this API?

    Thanks in advance.

     
    • Greg Fortune

      Greg Fortune - 2003-08-03

      Maybe I'm missing something, but I think 0.9.2 does that automatically.  Have you checked your values through the regular mysql client to see if they've got extra escape sequences?

       
    • Jason Evan

      Jason Evan - 2003-08-05

      Hello and thanks for your reply!

      I checked/double checked the data and they just have one \ before a ', " and \.

      When I retreive this data from a python scrpit, I also get those \ with it.  Is there a method in this module that would allow me to strip these slashes?

      These values were added to the database via PHP and I used addslashes() to add the slashes into the content.  I later use stripslashes() to remove them.  I tried making my own function in Python, but it didn't work quiet as well as PHP's functions did.

      Any help?

      Thanks again!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.