Commit 35c12509 authored by PJ Janse van Rensburg's avatar PJ Janse van Rensburg

Encode output values before passing them through tablib for export.

parent b5edc553
...@@ -2325,12 +2325,12 @@ class BaseModelView(BaseView, ActionsMixin): ...@@ -2325,12 +2325,12 @@ class BaseModelView(BaseView, ActionsMixin):
if encoding: if encoding:
mimetype = '%s; charset=%s' % (mimetype, encoding) mimetype = '%s; charset=%s' % (mimetype, encoding)
ds = tablib.Dataset(headers=[c[1] for c in self._export_columns]) ds = tablib.Dataset(headers=[csv_encode(c[1]) for c in self._export_columns])
count, data = self._export_data() count, data = self._export_data()
for row in data: for row in data:
vals = [self.get_export_value(row, c[0]) for c in self._export_columns] vals = [csv_encode(self.get_export_value(row, c[0])) for c in self._export_columns]
ds.append(vals) ds.append(vals)
try: try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment