-
Notifications
You must be signed in to change notification settings - Fork 42
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
percent signs escaping en trans/blocktrans templatetags #43
Comments
mgu
pushed a commit
to mgu/django-babel
that referenced
this issue
May 28, 2018
Closes python-babel#43 In Django >= 1.9, `%` signs are escaped to `%%` during extraction then replaced by `%` during the rendering. [1] The extraction now behaves in the same way. [1] django/django@b750889
mgu
pushed a commit
to mgu/django-babel
that referenced
this issue
May 28, 2018
Closes python-babel#43 In Django >= 1.9, `%` signs are escaped to `%%` during extraction then replaced by `%` during the rendering. [1] The extraction now behaves in the same way. [1] django/django@b750889
mgu
pushed a commit
to mgu/django-babel
that referenced
this issue
May 28, 2018
Closes python-babel#43 In Django >= 1.9, `%` signs are escaped to `%%` during extraction then replaced by `%` during the rendering. [1] The extraction now behaves in the same way. [1] django/django@b750889
mgu
pushed a commit
to mgu/django-babel
that referenced
this issue
May 28, 2018
Closes python-babel#43 In Django >= 1.9, `%` signs are escaped to `%%` during extraction then replaced by `%` during the rendering. [1] Before Django 1.9, only single percent signs were escaped. The extraction now behaves in the same way. [1] django/django@b750889
mgu
pushed a commit
to mgu/django-babel
that referenced
this issue
May 28, 2018
Closes python-babel#43 In Django >= 1.9, `%` signs are escaped to `%%` during extraction then replaced by `%` during the rendering. [1] Before Django 1.9, only single percent signs were escaped. The extraction now behaves in the same way. [1] django/django@b750889
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I look at the django source code, I see that
%
signs are escaped to%%
during extraction [1] [2] then replaced by%
during the rendering [3].There is no such replacements during the extraction, but Django will still want to replace
%%
by%
on rendering.If you confirm my analysis, I can create a PR to fix the issue
[1] https://github.com/django/django/blob/stable/1.11.x/django/utils/translation/template.py#L182
[2] https://github.com/django/django/blob/stable/1.11.x/django/utils/translation/template.py#L145
[3] https://github.com/django/django/blob/master/django/templatetags/i18n.py#L86
The text was updated successfully, but these errors were encountered: