Merge pull request #23498 from edx/ahtisham/PROD-1232

Fixed \n escape issue in import-export
This commit is contained in:
Ahtisham Shahid
2020-03-27 18:39:29 +05:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ class RawMixin(object):
data = etree.tostring(xml_object, pretty_print=True, encoding='unicode')
if pre_tag_data:
for index, pre_tag in enumerate(re.findall(PRE_TAG_REGEX, data)):
data = re.sub(re.escape(pre_tag), pre_tag_data[index].decode(), data)
data = re.sub(pre_tag, pre_tag_data[index].decode(), data)
return {'data': data}, []
def definition_to_xml(self, resource_fs):