Ticket #5216: label_tag.4.patch

File label_tag.4.patch, 597 bytes (added by Vadim Fint <mocksoul@…>, 7 years ago)

Django patch against [8752].

  • django/forms/forms.py

     
    371371        """
    372372        contents = contents or escape(self.label)
    373373        widget = self.field.widget
    374         id_ = widget.attrs.get('id') or self.auto_id
     374        id_ = smart_unicode(widget.attrs.get('id', '')) or self.auto_id
    375375        if id_:
    376376            attrs = attrs and flatatt(attrs) or ''
    377377            contents = '<label for="%s"%s>%s</label>' % (widget.id_for_label(id_), attrs, contents)
Back to Top