form: use force_str on rendered map (#36515)

This commit is contained in:
Frédéric Péters 2019-11-17 09:32:09 +01:00
parent 478ff982a1
commit a1414e1ebc
1 changed files with 1 additions and 1 deletions

View File

@ -2220,7 +2220,7 @@ class MapWidget(CompositeWidget):
self.add_media()
template_names = get_template_names(self)
context = {'widget': self}
return htmltext(render_block_to_string(template_names, 'widget-content', context).encode('utf-8'))
return htmltext(force_str(render_block_to_string(template_names, 'widget-content', context)))
def _parse(self, request):
CompositeWidget._parse(self, request)