general: don't mention encoding of XML export (= default as utf-8) (#37574)

This commit is contained in:
Frédéric Péters 2019-11-11 20:47:01 +01:00
parent 3e124dc3f3
commit 95bc775346
3 changed files with 5 additions and 5 deletions

View File

@ -1174,7 +1174,7 @@ class FormDefPage(Directory):
response.set_content_type('application/x-wcs-form')
response.set_header('content-disposition',
'attachment; filename=%s-%s.wcs' % (self.formdef_export_prefix, self.formdef.url_name))
return '<?xml version="1.0" encoding="iso-8859-15"?>\n' + ET.tostring(x)
return '<?xml version="1.0"?>\n' + ET.tostring(x)
def archive(self):
if get_publisher().is_using_postgresql():

View File

@ -900,19 +900,19 @@ class SettingsDirectory(QommonSettingsDirectory):
node = formdef.export_to_xml(include_id=True)
misc.indent_xml(node)
z.writestr(os.path.join('formdefs_xml', str(formdef.id)),
'<?xml version="1.0" encoding="iso-8859-15"?>\n' + ET.tostring(node))
'<?xml version="1.0"?>\n' + ET.tostring(node))
if 'carddefs' in self.dirs:
for formdef in CardDef.select():
node = formdef.export_to_xml(include_id=True)
misc.indent_xml(node)
z.writestr(os.path.join('carddefs_xml', str(formdef.id)),
'<?xml version="1.0" encoding="iso-8859-15"?>\n' + ET.tostring(node))
'<?xml version="1.0"?>\n' + ET.tostring(node))
if 'workflows' in self.dirs:
for workflow in Workflow.select():
node = workflow.export_to_xml(include_id=True)
misc.indent_xml(node)
z.writestr(os.path.join('workflows_xml', str(workflow.id)),
'<?xml version="1.0" encoding="iso-8859-15"?>\n' + ET.tostring(node))
'<?xml version="1.0"?>\n' + ET.tostring(node))
if self.settings:
z.write(os.path.join(self.app_dir, 'config.pck'), 'config.pck')

View File

@ -1669,7 +1669,7 @@ class WorkflowPage(Directory):
response.set_content_type('application/x-wcs-form')
response.set_header('content-disposition',
'attachment; filename=workflow-%s.wcs' % misc.simplify(self.workflow.name))
return '<?xml version="1.0" encoding="utf-8"?>\n' + ET.tostring(x)
return '<?xml version="1.0"?>\n' + ET.tostring(x)
def get_new_status_form(self):
r = TemplateIO(html=True)