{"repo": "isso-comments/isso", "pull_number": 485, "instance_id": "isso-comments__isso-485", "issue_numbers": "", "base_commit": "8e37a88d6d2b5fa3485f9aff39ff4b452ce2f578", "patch": "diff --git a/isso/utils/html.py b/isso/utils/html.py\n--- a/isso/utils/html.py\n+++ b/isso/utils/html.py\n@@ -6,61 +6,53 @@\n \n from distutils.version import LooseVersion as Version\n \n-HTML5LIB_VERSION = Version(pkg_resources.get_distribution(\"html5lib\").version)\n-HTML5LIB_SIMPLETREE = Version(\"0.95\")\n-\n-import html5lib\n-from html5lib.sanitizer import HTMLSanitizer\n-from html5lib.serializer import HTMLSerializer\n-\n+import bleach\n import misaka\n \n \n-def Sanitizer(elements, attributes):\n-\n- class Inner(HTMLSanitizer):\n+class Sanitizer(object):\n \n+ def __init__(self, elements, attributes):\n # attributes found in Sundown's HTML serializer [1]\n # except for tag,\n # because images are not generated anyways.\n #\n # [1] https://github.com/vmg/sundown/blob/master/html/html.c\n- allowed_elements = [\"a\", \"p\", \"hr\", \"br\", \"ol\", \"ul\", \"li\",\n+ self.elements = [\"a\", \"p\", \"hr\", \"br\", \"ol\", \"ul\", \"li\",\n \"pre\", \"code\", \"blockquote\",\n \"del\", \"ins\", \"strong\", \"em\",\n \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\",\n \"table\", \"thead\", \"tbody\", \"th\", \"td\"] + elements\n \n # href for and align for