Ticket #6160: 00-validation-error-escape.diff

File 00-validation-error-escape.diff, 510 bytes (added by Petr Marhoun <petr.marhoun@…>, 17 years ago)
  • django/newforms/util.py

    === modified file 'django/newforms/util.py'
     
    4040    def as_ul(self):
    4141        if not self: return u''
    4242        return mark_safe(u'<ul class="errorlist">%s</ul>'
    43                 % ''.join([u'<li>%s</li>' % force_unicode(e) for e in self]))
     43                % ''.join([u'<li>%s</li>' % escape(force_unicode(e)) for e in self]))
    4444
    4545    def as_text(self):
    4646        if not self: return u''
Back to Top