We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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: mozilla/bleach@29231a1
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.
The text was updated successfully, but these errors were encountered:
Yup, ran into this one too.
Sorry, something went wrong.
Yep same
I just changed line 113 to this and it seems to work so far: protocols=list(ALLOWED_PROTOCOLS) + ["tel"],
In utils/html, convert ALLOWED_PROTOCOLS to list before appending ["t…
e7f7491
…el"]; Fixes stephenmcd#2054 due to Bleach version change
No branches or pull requests
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: mozilla/bleach@29231a1
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.
The text was updated successfully, but these errors were encountered: