Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #5991 -- Marked the generated HTML for newforms.extra.SelectDat…

…eWidget as

safe. Patch from alberto.piai@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@6723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5a5a71edcdbb2062dd5480ebb05e8098dc49d3cc 1 parent 1c87a7b
@malcolmt malcolmt authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/newforms/extras/widgets.py
View
3  django/newforms/extras/widgets.py
@@ -6,6 +6,7 @@
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 @@ def render(self, name, value, attrs=None):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.