title: Ignoring escape characters in python
body: <p>I am trying to insert a title into a DB.  Sometimes the title has quotes and it throws an error.</p>
  
  <p>I can't replace quotes with a \" because it thinks that I am escaping the quote.</p>
  
  <pre><code>sql = 'UPDATE `table_name` SET `title`="{}";'
  
  title = 'A "Title" With Quotes'
  
  sql.format(title.replace('"','\"'))
  </code></pre>
  
  <p>This replaces the quotes with more quotes so it changes nothing.</p>
  
  <pre><code>'UPDATE `table_name` SET `title`="A "Title" With Quotes";'
  </code></pre>
  
  <p>If I try to escape the backslash it doesn't escape anything.</p>
  
  <pre><code>sql.format(title.replace('"','\\"'))
  
  'UPDATE `table_name` SET `title`="A \\"Title\\" With Quotes";'
  </code></pre>