diff roundup/cgi/templating.py @ 5485:b0359a7c5b6d

create input elements with attributes in a defined (sorted) order
author Christof Meerwald <cmeerw@cmeerw.org>
date Thu, 02 Aug 2018 20:56:01 +0100
parents ad8031290639
children 52cb53eedf77
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Thu Aug 02 19:56:28 2018 +0100
+++ b/roundup/cgi/templating.py	Thu Aug 02 20:56:01 2018 +0100
@@ -444,7 +444,7 @@
 
 def cgi_escape_attrs(**attrs):
     return ' '.join(['%s="%s"'%(k,cgi.escape(str(v), True))
-        for k,v in attrs.items()])
+        for k,v in sorted(attrs.items())])
 
 def input_html4(**attrs):
     """Generate an 'input' (html4) element with given attributes"""

Roundup Issue Tracker: http://roundup-tracker.org/