-
Notifications
You must be signed in to change notification settings - Fork 61
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
Apply {% localize off %} on <img> element #107
Conversation
At least {{ picture_size.size.0 }}px in line 32 of the template picture.html can have a decimal comma in some cases which causes the image not to be displayed in Firefox 95.0b8 and Chrome 96.0.4664.45.
It'd be good to have a test for this to prevent regression. What you'd need to do in a test is create a template that tried to localize the value.
I have a feeling you'll also need to define the format of the localization. I'm not so sure on how best to do that - would need some googling. |
Well, we already have the standard template The only possible danger for a regression is that there is a number or date in the |
My reason for mentioning the template in the test was that it seems like this change forces localization to be turned off in the template, so you might want a test with a different template where the content was localized to prevent regression. In terms of setting the language, you can use override_settings
The test helpers are able to create images, just take a look at the model tests and then the helpers are here; https://github.com/django-cms/djangocms-picture/blob/master/tests/helpers.py |
Okay, I will try, but I can only spend a limited amount of time on it. I think it is more important to reproduce the error I encountered in the test, i. e. a decimal comma Anyway, some things to point out:
|
Description
At least {{ picture_size.size.0 }}px in line 32 of the template picture.html
can have a decimal comma in some cases which causes the image not to be
displayed in Firefox 95.0b8 and Chrome 96.0.4664.45.
Checklist
master
Slack to find a “pr review buddy” who is going to review my pull request.