# HG changeset patch # User jruigrok # Date 1246267982 0 # Node ID 1ae18bca8de45edc79b1120a6fbc6c7e6fb4f0d9 # Parent d10e5bceaa1fd8d11a7f4a4d108c64c125129aba Fix two instances of using None, which would cause an AttributeError. Submitted by: Jon Nelson diff --git a/genshi/filters/html.py b/genshi/filters/html.py --- a/genshi/filters/html.py +++ b/genshi/filters/html.py @@ -88,7 +88,7 @@ elif in_form: if tagname == 'input': - type = attrs.get('type').lower() + type = attrs.get('type', '').lower() if type in ('checkbox', 'radio'): name = attrs.get('name') if name and name in self.data: @@ -110,7 +110,7 @@ attrs |= [(QName('checked'), 'checked')] elif 'checked' in attrs: attrs -= 'checked' - elif type in (None, 'hidden', 'text') \ + elif type in ('', 'hidden', 'text') \ or type == 'password' and self.passwords: name = attrs.get('name') if name and name in self.data: