If in any of the form fields are unicode strings entered as input, the

unicode characters in these strings are lost in self.vars.

This conditions sets it back to the original input.

Might be, that this should be done at another place, but it works.
This commit is contained in:
Nik Klever
2015-09-05 14:38:32 +02:00
parent d4270373e1
commit 2a245d36f4

View File

@@ -1668,6 +1668,9 @@ class SQLFORM(FORM):
elif field.type == 'double':
if value is not None:
fields[fieldname] = safe_float(value)
elif field.type in ('string', 'text'):
if fieldname in self.request_vars:
fields[fieldname] = self.request_vars[fieldname]
for fieldname in self.vars:
if fieldname != 'id' and fieldname in self.table.fields\