1
0
mirror of https://github.com/django/django.git synced 2025-10-27 23:56:08 +00:00

Refs #24469 -- Fixed escaping of forms, fields, and media in non-Django templates.

This commit is contained in:
Moritz Sichert
2015-03-10 21:21:28 +01:00
committed by Tim Graham
parent 465edf2bb2
commit 6bff343989
5 changed files with 37 additions and 1 deletions

View File

@@ -51,6 +51,9 @@ class Media(object):
for name in MEDIA_TYPES:
getattr(self, 'add_' + name)(media_attrs.get(name, None))
def __html__(self):
return force_text(self)
def __str__(self):
return self.render()