Browse files

newforms-admin: Fixed #7391 -- Mark the output of BaseFormSet.as_tabl…

…e safe. Thanks akaihola!

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 453d560 commit 65ef8d4da78c94a8b1da5ac058f1b85b942f58ae @brosner brosner committed Jun 7, 2008
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/newforms/
@@ -1,5 +1,6 @@
from forms import Form
from django.utils.encoding import StrAndUnicode
+from django.utils.safestring import mark_safe
from fields import IntegerField, BooleanField
from widgets import Media, HiddenInput, TextInput
from util import ErrorList, ValidationError
@@ -258,7 +259,7 @@ def as_table(self):
# probably should be. It might make sense to render each form as a
# table row with each field as a td.
forms = u' '.join([form.as_table() for form in self.forms])
- return u'\n'.join([unicode(self.management_form), forms])
+ return mark_safe(u'\n'.join([unicode(self.management_form), forms]))
# XXX: This API *will* change. Use at your own risk.
def _formset_factory(form, formset=BaseFormSet, extra=1, can_order=False, can_delete=False):

0 comments on commit 65ef8d4

Please sign in to comment.