I use Python and MySQLdb to download web pages and store them into database. The problem I have is that I can't save complicated strings in the database because they are not properly escaped.
Is there a function in Python that I can use to escape a string for MySQL? I tried with
''' (triple simple quotes) and
""", but it didn't work. I know that PHP has
mysql_escape_string(), is something similar in Python?