[1.5.x] Sort HTML attributes on generated forms

Backport of 6b9f130278 from master
This commit is contained in:
Ian Clelland 2012-09-27 21:30:13 -07:00 committed by Luke Plant
parent cade3405c0
commit 5f07d24eaa
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ def flatatt(attrs):
The result is passed through 'mark_safe'.
"""
return format_html_join('', ' {0}="{1}"', attrs.items())
return format_html_join('', ' {0}="{1}"', sorted(attrs.items()))
@python_2_unicode_compatible
class ErrorDict(dict):