markdown: fix TypeError on bleach 6

Fixes the following error:

    Traceback (most recent call last):
      File "/home/simon/src/meta.sr.ht/./metasrht-initdb", line 10, in <module>
        import metasrht.types
      File "/home/simon/src/meta.sr.ht/metasrht/types/__init__.py", line 1, in <module>
        from .user import *
      File "/home/simon/src/meta.sr.ht/metasrht/types/user.py", line 5, in <module>
        from srht.oauth import UserMixin, UserType
      File "/home/simon/src/core.sr.ht/srht/oauth/__init__.py", line 61, in <module>
        from srht.oauth.blueprint import oauth_blueprint
      File "/home/simon/src/core.sr.ht/srht/oauth/blueprint.py", line 6, in <module>
        from srht.flask import csrf_bypass
      File "/home/simon/src/core.sr.ht/srht/flask.py", line 11, in <module>
        from srht.markdown import markdown
      File "/home/simon/src/core.sr.ht/srht/markdown.py", line 175, in <module>
        tags=bleach.sanitizer.ALLOWED_TAGS + [
    TypeError: unsupported operand type(s) for +: 'frozenset' and 'list'
This commit is contained in:
Simon Ser 2023-02-10 09:30:03 +00:00 committed by Drew DeVault
parent 8652a9ef70
commit fb54daf26c
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ except ImportError:
_sanitizer_css["styles"] = bleach.sanitizer.ALLOWED_STYLES + _sanitizer_styles
_sanitizer = bleach.sanitizer.Cleaner(
tags=bleach.sanitizer.ALLOWED_TAGS + [
tags=list(bleach.sanitizer.ALLOWED_TAGS) + [
"p", "div", "span", "pre", "hr", "br",
"dd", "dt", "dl",
"table", "thead", "tbody", "tr", "th", "td",