Code

Ticket #8966: 8966_naive_fix.diff

File 8966_naive_fix.diff, 471 bytes (added by carljm, 6 years ago)

simple fix (remove is_safe from length_is filter)

Line 
1Index: django/template/defaultfilters.py
2===================================================================
3--- django/template/defaultfilters.py   (revision 8961)
4+++ django/template/defaultfilters.py   (working copy)
5@@ -476,7 +476,6 @@
6 def length_is(value, arg):
7     """Returns a boolean of whether the value's length is the argument."""
8     return len(value) == int(arg)
9-length_is.is_safe = True
10 
11 def random(value):
12     """Returns a random item from the list."""