Ticket #5730: radioselect_escape_label.patch

File radioselect_escape_label.patch, 520 bytes (added by Densetsu no Ero-sennin <densetsu.no.ero.sennin@…>, 17 years ago)

Escape label in RadioSelect widget

  • django/newforms/widgets.py

     
    246246        self.index = index
    247247
    248248    def __unicode__(self):
    249         return u'<label>%s %s</label>' % (self.tag(), self.choice_label)
     249        return u'<label>%s%s</label>' % (self.tag(), escape(force_unicode(self.choice_label)))
    250250
    251251    def is_checked(self):
    252252        return self.value == self.choice_value
Back to Top