workflows: only encode on py2 (#36515)
This commit is contained in:
parent
e541759a67
commit
30ff9ff561
|
@ -2622,10 +2622,11 @@ def get_formdata_template_context(formdata=None):
|
|||
ctx['after'] = ctx.get('form_status')
|
||||
ctx['evolution'] = ctx.get('form_evolution')
|
||||
|
||||
charset = get_publisher().site_charset
|
||||
for k, v in ctx.items():
|
||||
if isinstance(v, unicode):
|
||||
ctx[k] = v.encode(charset, 'ignore')
|
||||
if six.PY2:
|
||||
charset = get_publisher().site_charset
|
||||
for k, v in ctx.items():
|
||||
if isinstance(v, unicode):
|
||||
ctx[k] = v.encode(charset, 'ignore')
|
||||
return ctx
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue