diff -ur Genshi-0.6/genshi/filters/html.py Genshi-0.6.mod/genshi/filters/html.py
|
old
|
new
|
|
| 25 | 25 | __all__ = ['HTMLFormFiller', 'HTMLSanitizer'] |
| 26 | 26 | __docformat__ = 'restructuredtext en' |
| 27 | 27 | |
| | 28 | text_inputs = ( |
| | 29 | '', |
| | 30 | 'hidden', |
| | 31 | 'text', |
| | 32 | # HTML 5 |
| | 33 | 'date', |
| | 34 | 'datetime', |
| | 35 | 'datetime-local', |
| | 36 | 'email', |
| | 37 | 'month', |
| | 38 | 'number', |
| | 39 | 'search', |
| | 40 | 'tel', |
| | 41 | 'time', |
| | 42 | 'url', |
| | 43 | 'week' |
| | 44 | ) |
| 28 | 45 | |
| 29 | 46 | class HTMLFormFiller(object): |
| 30 | 47 | """A stream filter that can populate HTML forms from a dictionary of values. |
| … |
… |
|
| 114 | 131 | attrs |= [(QName('checked'), 'checked')] |
| 115 | 132 | elif 'checked' in attrs: |
| 116 | 133 | attrs -= 'checked' |
| 117 | | elif type in ('', 'hidden', 'text') \ |
| | 134 | elif type in text_inputs \ |
| 118 | 135 | or type == 'password' and self.passwords: |
| 119 | 136 | name = attrs.get('name') |
| 120 | 137 | if name and name in self.data: |