Unpack self-closing tags when converting domToText (#3665)

* Unpack self-closing tags when converting domToText
This commit is contained in:
Sam El-Husseini
2020-01-27 15:32:12 -08:00
committed by GitHub
parent 6dbb023a1d
commit 4a94dc8a85
3 changed files with 4 additions and 6 deletions

View File

@@ -340,10 +340,6 @@ WorkspaceFactoryController.prototype.exportXmlFile = function(exportMode) {
throw Error(msg);
}
// Unpack self-closing tags. These tags fail when embedded in HTML.
// <block name="foo"/> -> <block name="foo"></block>
configXml = configXml.replace(/<(\w+)([^<]*)\/>/g, '<$1$2></$1>');
// Download file.
var data = new Blob([configXml], {type: 'text/xml'});
this.view.createAndDownloadFile(fileName, data);