code: def set_html5_doctype(self):
          
          doctype = b'<!DOCTYPE html>\n'
          content = doctype_re.subn(doctype, self.response.content, 1)[0]
          self.response.content = content
docs: Method used to transform a doctype in to a properly html5 doctype