Ticket #5945: safe_constants.diff
File safe_constants.diff, 941 bytes (added by , 17 years ago) |
---|
-
django/template/__init__.py
594 594 arg_vals = [] 595 595 for lookup, arg in args: 596 596 if not lookup: 597 arg_vals.append( arg)597 arg_vals.append(mark_safe(arg)) 598 598 else: 599 599 arg_vals.append(arg.resolve(context)) 600 600 if getattr(func, 'needs_autoescape', False): … … 701 701 # If it's wrapped with quotes (single or double), then 702 702 # we're also dealing with a literal. 703 703 if var[0] in "\"'" and var[0] == var[-1]: 704 self.literal = var[1:-1]704 self.literal = mark_safe(var[1:-1]) 705 705 706 706 else: 707 707 # Otherwise we'll set self.lookups so that resolve() knows we're