diff options
| author | Moritz Sichert <moritz.sichert@googlemail.com> | 2015-03-10 21:21:28 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-03-18 09:11:01 -0400 |
| commit | 6bff3439894ac22d80f270f36513fc86586273f3 (patch) | |
| tree | e48e6b1e22cbf909e8cd41dc77c5e86f0e0c4ecd /django/forms/widgets.py | |
| parent | 465edf2bb2b6dd6158b198922dc0f185a15cc715 (diff) | |
Refs #24469 -- Fixed escaping of forms, fields, and media in non-Django templates.
Diffstat (limited to 'django/forms/widgets.py')
| -rw-r--r-- | django/forms/widgets.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index 2ce3f42d6a..9a73ddb9ca 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -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() |
