Ticket #5216: label_tag.3.patch

File label_tag.3.patch, 585 bytes (added by MockSoul <mocksoul@…>, 17 years ago)

See comment:8

  • newforms/forms.py

     
    304304        """
    305305        contents = contents or escape(self.label)
    306306        widget = self.field.widget
    307         id_ = widget.attrs.get('id') or self.auto_id
     307        id_ = smart_unicode(widget.attrs.get('id', '')) or self.auto_id
    308308        if id_:
    309309            attrs = attrs and flatatt(attrs) or ''
    310310            contents = '<label for="%s"%s>%s</label>' % (widget.id_for_label(id_), attrs, contents)
Back to Top