trivial: do not use an intermediary variable for widowless templatetag
This commit is contained in:
parent
cedb5ed407
commit
7aa873d283
|
@ -11,8 +11,7 @@ def widowless(value):
|
|||
'''Replace normal spaces by non-breakable spaces'''
|
||||
bits = escape(value).rsplit(' ', 1)
|
||||
try:
|
||||
widowless = u' '.join(bits)
|
||||
return mark_safe(widowless)
|
||||
return mark_safe(u' '.join(bits))
|
||||
except:
|
||||
return value
|
||||
register.filter(widowless)
|
||||
|
|
Reference in New Issue