Hello Malcolm,

SelectDateWidget from newform extras stopped working after
autoescaping was introduced in r6671. Here is the tiny patch to fix
it.

Regards, and thanks for the great work.

Alberto

Index: django/newforms/extras/widgets.py
===================================================================
--- django/newforms/extras/widgets.py   (revision 6702)
+++ django/newforms/extras/widgets.py   (working copy)
@@ -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 @@
         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)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to