title: replace can't find % string literals
body: <p>Probably a very basic question, but the following code fails to replace!</p>
  <pre><code>h = '%3c'
  c = '&lt;'
  s = 'blah %3c blah'
  s.replace(h,c)
  print(s)
  </code></pre>
  <p>The result is <code>'blah %3c blah'</code>.</p>
  <p>How do I make replace treat <code>%3c</code> as a normal string.</p>
  <p>For context, I am HTML encoding and decoding strings by replacing unsafe characters with their %hex representation. I would greatly prefer to use a library for this but haven't been able to find one. As well as answering the above question, the name of such a library would be good.</p>