--- a/common/tags.py Mon May 04 13:36:31 2009 +0200
+++ b/common/tags.py Mon May 04 15:46:40 2009 +0200
@@ -36,8 +36,9 @@
attrs['multiple'] = 'multiple'
if id:
attrs['id'] = id
- html = [u'<select name="%s" %s>' % (
- name, ' '.join('%s="%s"' % kv for kv in attrs.items()))]
+ attrs['name'] = name
+ html = [u'<select %s>' % ' '.join('%s="%s"' % kv
+ for kv in sorted(attrs.items()))]
html += options
html.append(u'</select>')
return u'\n'.join(html)
--- a/common/uilib.py Mon May 04 13:36:31 2009 +0200
+++ b/common/uilib.py Mon May 04 15:46:40 2009 +0200
@@ -214,7 +214,7 @@
except KeyError:
pass
value += u' ' + u' '.join(u'%s="%s"' % (attr, html_escape(unicode(value)))
- for attr, value in attrs.items()
+ for attr, value in sorted(attrs.items())
if value is not None)
if content:
if escapecontent: