Changeset 6724
- Timestamp:
- 11/28/07 15:04:05 (1 year ago)
- Files:
-
- django/trunk/django/template/__init__.py (modified) (1 diff)
- django/trunk/tests/regressiontests/templates/tests.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/template/__init__.py
r6680 r6724 548 548 var, constant, i18n_constant = match.group("var", "constant", "i18n_constant") 549 549 if i18n_constant: 550 var = '"%s"' % _(i18n_constant )550 var = '"%s"' % _(i18n_constant.replace(r'\"', '"')) 551 551 elif constant: 552 var = '"%s"' % constant 552 var = '"%s"' % constant.replace(r'\"', '"') 553 553 upto = match.end() 554 554 if var == None: django/trunk/tests/regressiontests/templates/tests.py
r6689 r6724 268 268 # Embedded newlines make it not-a-tag. 269 269 'basic-syntax24': ("{{ moo\n }}", {}, "{{ moo\n }}"), 270 271 # Literal strings are permitted inside variables, mostly for i18n 272 # purposes. 273 'basic-syntax25': ('{{ "fred" }}', {}, "fred"), 274 'basic-syntax26': (r'{{ "\"fred\"" }}', {}, "\"fred\""), 275 'basic-syntax27': (r'{{ _("\"fred\"") }}', {}, "\"fred\""), 270 276 271 277 # List-index syntax allows a template to access a certain item of a subscriptable object.
