comparison MoinMoin/formatter/text_html.py @ 1870:9406e02388cf

reduce usage of .keys()
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 10 Mar 2007 23:16:23 +0100
parents 64507f46beb2
children 5c3dffe2abf1
comparison
equal deleted inserted replaced
1869:88326c62ae53 1870:9406e02388cf
286 # attributes[('html', 'lang')] = attributes[('xml', 'lang')] 286 # attributes[('html', 'lang')] = attributes[('xml', 'lang')]
287 287
288 # Check all the HTML attributes to see if they are known and 288 # Check all the HTML attributes to see if they are known and
289 # allowed. Ignore attributes if in non-HTML namespaces. 289 # allowed. Ignore attributes if in non-HTML namespaces.
290 if allowed_attrs: 290 if allowed_attrs:
291 for name in [key[1] for key in attributes.keys() if key[0] == 'html']: 291 for name in [key[1] for key in attributes if key[0] == 'html']:
292 if name in _common_attributes or name in allowed_attrs: 292 if name in _common_attributes or name in allowed_attrs:
293 pass 293 pass
294 elif name.startswith('on'): 294 elif name.startswith('on'):
295 pass # Too many event handlers to enumerate, just let them all pass. 295 pass # Too many event handlers to enumerate, just let them all pass.
296 else: 296 else: