code: def unescape(s, unicode_action="replace"):
      
      import HTMLParser
      hp = HTMLParser.HTMLParser()
      s = hp.unescape(s)
      s = s.encode('ascii', unicode_action)
      s = s.replace("\n", "").strip()
      return s
docs: Unescape HTML strings, and convert &amp; etc.