Open dbeltra opened 1 year ago
When trying to save a rich text page you get the following error:
TypeError: unsupported operand type(s) for +: 'frozenset' and 'list'
The page should be saved without errors
* Mezzanine 6.0.0 * Django 4.1.7 * Python 3.8.13 * SQLite 3.38.5 * Darwin 21.4.0
On the latest bleach release, ALLOWED_PROTOCOLS has been changed from list to a frozenset, this is the specific commit: https://github.com/mozilla/bleach/commit/29231a10eb983e25b59c8edc5b6abcb12dbaaabe
This makes this code (https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/utils/html.py#L113) crash: protocols=ALLOWED_PROTOCOLS + ["tel"] since lists and frozensets can't be added
protocols=ALLOWED_PROTOCOLS + ["tel"]
Downgrading to bleach==5.0.1 fixes the issue.
Yup, ran into this one too.
Yep same
I just changed line 113 to this and it seems to work so far: protocols=list(ALLOWED_PROTOCOLS) + ["tel"],
Is there an existing issue for this?
Current Behavior
When trying to save a rich text page you get the following error:
TypeError: unsupported operand type(s) for +: 'frozenset' and 'list'
Expected Behavior
The page should be saved without errors
Steps To Reproduce
Environment
Anything else?
On the latest bleach release, ALLOWED_PROTOCOLS has been changed from list to a frozenset, this is the specific commit: https://github.com/mozilla/bleach/commit/29231a10eb983e25b59c8edc5b6abcb12dbaaabe
This makes this code (https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/utils/html.py#L113) crash:
protocols=ALLOWED_PROTOCOLS + ["tel"]
since lists and frozensets can't be addedDowngrading to bleach==5.0.1 fixes the issue.