Skip to content

Commit

Permalink
fix registry-export with Generic Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
pbauer committed Mar 2, 2019
1 parent bda8bce commit 94379ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plone/app/registry/exportimport/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
from plone.supermodel.utils import ns
from plone.supermodel.utils import prettyXML
from plone.supermodel.utils import valueToElement
from Products.CMFPlone.utils import safe_encode
from Products.CMFPlone.utils import safe_unicode
from zope.component import queryUtility
from zope.configuration import config
from zope.configuration import xmlconfig
from zope.dottedname.resolve import resolve
from zope.schema import getFieldNames

import six


_marker = object()

Expand Down Expand Up @@ -91,7 +91,7 @@ def exportRegistry(context):
exporter = RegistryExporter(registry, context)
body = exporter.exportDocument()
if body is not None:
context.writeDataFile('registry.xml', body, 'text/xml')
context.writeDataFile('registry.xml', safe_encode(body), 'text/xml')


class RegistryImporter(object):
Expand Down Expand Up @@ -370,7 +370,7 @@ def importRecords(self, node):
continue
elif child.tag.lower() == 'omit':
if child.text:
omit.append(six.text_type(child.text))
omit.append(safe_unicode(child.text))
elif child.tag.lower() == 'value':
values.append(child)

Expand Down

0 comments on commit 94379ab

Please sign in to comment.