              text = forms.CharField(label=mark_safe('<i>text</i>'))
              cb   = forms.BooleanField(label=mark_safe('<i>cb</i>'))
  
          form = MyForm()
          self.assertEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                           '<label for="id_text" class="required inline"><i>text</i>:</label>')
          self.assertEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                           '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>')
  
          # normal strings needs to be escaped
          class MyForm(forms.Form):
              text = forms.CharField(label='&text')
              cb   = forms.BooleanField(label='&cb')
 
</s> remove         self.assertEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                         '<label for="id_text" class="required inline">&amp;text:</label>')
        self.assertEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                         '<label for="id_cb" class="vCheckboxLabel required inline">&amp;cb</label>')
 </s> add         self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline">&amp;text:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline">&amp;cb</label>') </s> remove class UtilTests(unittest.TestCase):
 </s> add class UtilTests(SimpleTestCase): </s> remove         self.assertEqual(display_value, expected)
 </s> add         self.assertHTMLEqual(display_value, expected) </s> remove             contents = format_html('<label for="{0}"{1}>{2}</label>',
                                   widget.id_for_label(id_), attrs, contents
                                   )
 </s> add             contents = format_html('<label{0}>{1}</label>', attrs, contents)
        self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline"><i>text</i>:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>')
              text = forms.CharField(label=mark_safe('<i>text</i>'))
              cb   = forms.BooleanField(label=mark_safe('<i>cb</i>'))
  
          form = MyForm()
        self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline"><i>text</i>:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline"><i>text</i>:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline"><i>text</i>:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline"><i>text</i>:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>')
  
          # normal strings needs to be escaped
          class MyForm(forms.Form):
              text = forms.CharField(label='&text')
              cb   = forms.BooleanField(label='&cb')
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Fixed #11725 -- Made possible to create widget label tag without "for"

Thanks Denis Martinez for the report and initial patch, and
Sergey Kolosov for bringing the patch up to date. 
tests/admin_util/tests.py