Skip to content

Commit

Permalink
Fixed corner case which produced harmless but incorrect output if the…
Browse files Browse the repository at this point in the history
… special case attribute value is False
  • Loading branch information
clsdaniel committed Aug 4, 2012
1 parent fb00eac commit 38a4505
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tw2/core/jinja_util.py
Expand Up @@ -6,6 +6,9 @@

def htmlbools(v):
attrs = copy(v)
for key in filter(lambda k: k in _BOOLEAN_ATTRS and attrs[k], attrs.keys()):
attrs[key] = key
for key in filter(lambda k: k in _BOOLEAN_ATTRS, attrs.keys()):
if attrs[key]:
attrs[key] = key
else:
attrs[key] = None
return attrs

0 comments on commit 38a4505

Please sign in to comment.