title: Convert & to &amp; in Python
body: <p>I'm working on a simple crawler in Python. The aim is to create a sitemap.xml.
  (you can find the very alpha version here: <a href="http://code.google.com/p/sitemappy/" rel="nofollow noreferrer">http://code.google.com/p/sitemappy/</a>)
  I noticed that if I generate the xml with URLs containing non HTML entities (such as &amp;), the xml doesn't validate and it isn't accepted by Google Webmaster Tools.
  Is there a quick way to encode the querystring part of the URLs?</p>
  
  <p>Thank you!</p>
  
  <p>Matteo</p>