diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-11-28 20:19:58 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-11-28 20:19:58 +0000 |
| commit | 5a5a71edcdbb2062dd5480ebb05e8098dc49d3cc (patch) | |
| tree | 2233b58ae6f21bdde50ae81e2536c2a9878f1d8e | |
| parent | 1c87a7bb58c24f0ba1b89a9e5776eb24116caa08 (diff) | |
Fixed #5991 -- Marked the generated HTML for newforms.extra.SelectDateWidget as
safe. Patch from alberto.piai@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/newforms/extras/widgets.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/newforms/extras/widgets.py b/django/newforms/extras/widgets.py index 60936a6bd6..0097ba3f54 100644 --- a/django/newforms/extras/widgets.py +++ b/django/newforms/extras/widgets.py @@ -6,6 +6,7 @@ import datetime from django.newforms.widgets import Widget, Select from django.utils.dates import MONTHS +from django.utils.safestring import mark_safe __all__ = ('SelectDateWidget',) @@ -51,7 +52,7 @@ class SelectDateWidget(Widget): select_html = Select(choices=year_choices).render(self.year_field % name, year_val) output.append(select_html) - return u'\n'.join(output) + return mark_safe(u'\n'.join(output)) def value_from_datadict(self, data, files, name): y, m, d = data.get(self.year_field % name), data.get(self.month_field % name), data.get(self.day_field % name) |
