mirror of
https://github.com/django/django.git
synced 2025-07-22 20:55:17 +00:00
Refs #24469 -- Fixed escaping of forms, fields, and media in non-Django templates.
This commit is contained in:
parent
465edf2bb2
commit
6bff343989
5 changed files with 37 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue