-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
escape()
fails with certain str
subclasses
#472
Comments
A similar thing to the previous issue is happening. The object isn't a direct |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
I'll still fix this. But I'm pretty sure
That's probably why MarkupSafe provides the |
@davidism it is a bug, no one claimed otherwise. I just posted a workaround since I needed it too. |
I'm saying the class producing this error is also a bug. Outside of this library. |
MarkupSafe 3.0.2 is available on PyPI. |
I have a very similar issue to #467, however it is one that persists after the 3.0.1 patch.
Essentially what is happening is that
str
subclasses which override__str__()
are no longer (since 2.1.5) handled in the same wayI encountered this with django's SafeString, however for the purpose of repro I have a simpler example below:
output:
Environment:
The text was updated successfully, but these errors were encountered: