diff --git a/django/utils/html.py b/django/utils/html.py
index a9ebd17..b37cd76 100644
a
|
b
|
def format_html(format_string, *args, **kwargs):
|
80 | 80 | and calls 'mark_safe' on the result. This function should be used instead |
81 | 81 | of str.format or % interpolation to build up small HTML fragments. |
82 | 82 | """ |
83 | | args_safe = map(conditional_escape, args) |
84 | | kwargs_safe = dict([(k, conditional_escape(v)) for (k, v) in |
| 83 | args_safe = [six.text_type(conditional_escape(v)) for v in args] |
| 84 | kwargs_safe = dict([(k, six.text_type(conditional_escape(v))) for (k, v) in |
85 | 85 | six.iteritems(kwargs)]) |
86 | 86 | return mark_safe(format_string.format(*args_safe, **kwargs_safe)) |
87 | 87 | |