code: def sanitize(self, content):
          
          import html5lib
          from html5lib import sanitizer
          p = html5lib.HTMLParser(tokenizer=sanitizer.HTMLSanitizer)
          dom_tree = p.parseFragment(content)
          return dom_tree.text
docs: Sanitize a string in order to avoid possible XSS using
          ``html5lib``.