Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Malcolm Tredinnick authored November 28, 2007

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/newforms/extras/widgets.py
3  django/newforms/extras/widgets.py
@@ -6,6 +6,7 @@
6 6
 
7 7
 from django.newforms.widgets import Widget, Select
8 8
 from django.utils.dates import MONTHS
  9
+from django.utils.safestring import mark_safe
9 10
 
10 11
 __all__ = ('SelectDateWidget',)
11 12
 
@@ -51,7 +52,7 @@ def render(self, name, value, attrs=None):
51 52
         select_html = Select(choices=year_choices).render(self.year_field % name, year_val)
52 53
         output.append(select_html)
53 54
 
54  
-        return u'\n'.join(output)
  55
+        return mark_safe(u'\n'.join(output))
55 56
 
56 57
     def value_from_datadict(self, data, files, name):
57 58
         y, m, d = data.get(self.year_field % name), data.get(self.month_field % name), data.get(self.day_field % name)

0 notes on commit 5a5a71e

Please sign in to comment.
Something went wrong with that request. Please try again.