Skip to content

Commit

Permalink
restores py27 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
smirolo committed Jan 18, 2024
1 parent 396aa2a commit ebe1731
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@
'thead',
'tr',
]
if int(bleach.__version__.split('.', maxsplit=1)[0]) >= 6:
# `maxsplit` argument is only available on Python 3+
if int(bleach.__version__.split('.')[0]) >= 6:
ALLOWED_TAGS = bleach.ALLOWED_TAGS | frozenset(_CUSTOM_ALLOWED_TAGS)
else:
ALLOWED_TAGS = bleach.ALLOWED_TAGS + _CUSTOM_ALLOWED_TAGS
Expand Down

0 comments on commit ebe1731

Please sign in to comment.