Commit 5f07d24e authored by Ian Clelland's avatar Ian Clelland Committed by Luke Plant
Browse files

[1.5.x] Sort HTML attributes on generated forms

Backport of 6b9f1302 from master
parent cade3405
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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):