Mercurial > genshi > mirror
diff genshi/filters/html.py @ 844:1ae18bca8de4 trunk
Fix two instances of using None, which would cause an AttributeError.
Submitted by: Jon Nelson
author | jruigrok |
---|---|
date | Mon, 29 Jun 2009 09:33:02 +0000 |
parents | 86b5cee4eb6c |
children | f33ecf3c319e |
line wrap: on
line diff
--- 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: