diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-01-10 23:25:29 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-01-10 23:25:29 +0000 |
| commit | fa38ce720767c65847290a497599338a9659d9ca (patch) | |
| tree | 57ce021ad59a579daeb4184aed8af482af885f62 /django/newforms/widgets.py | |
| parent | f6a7002ef16b3c7ca62c0b44013d9274c0842094 (diff) | |
Fixed #3266 -- newforms: Made RadioSelect accept funky characters. Thanks for reporting, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms/widgets.py')
| -rw-r--r-- | django/newforms/widgets.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/django/newforms/widgets.py b/django/newforms/widgets.py index df8bb19c4f..4e4fc0c80b 100644 --- a/django/newforms/widgets.py +++ b/django/newforms/widgets.py @@ -172,14 +172,15 @@ class RadioInput(StrAndUnicode): def __init__(self, name, value, attrs, choice, index): self.name, self.value = name, value self.attrs = attrs - self.choice_value, self.choice_label = choice + self.choice_value = smart_unicode(choice[0]) + self.choice_label = smart_unicode(choice[1]) self.index = index def __unicode__(self): return u'<label>%s %s</label>' % (self.tag(), self.choice_label) def is_checked(self): - return self.value == smart_unicode(self.choice_value) + return self.value == self.choice_value def tag(self): if self.attrs.has_key('id'): |
