-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
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
MarkupSafe 3.0.0 throws when used with SimpleLazyObjects #467
Comments
You've cut off the traceback. |
Thanks, updated |
I'm guessing this is some weird side effect of the proxy object. |
I'm not particularly familiar with these Django utils, but I had a look and it seems like there's a |
The wider context - we're getting to escape via a Jinja tag, on django's csrf_token tag
Which is natively returned as a SimpleLazyObject by the django: https://github.com/django/django/blob/main/django/template/context_processors.py#L33 So I'm guessing this may be an issue others run into in some situations, and isn't directly in custom code |
It looks like adding a |
If you attempt to escape a SimpleLazyObject using Markup.escape, it will throw as below. Confirmed working in MarkupSafe 2.1.5.
Output:
Environment:
The text was updated successfully, but these errors were encountered: