mirror of
https://github.com/google/blockly.git
synced 2025-12-16 06:10:12 +01:00
Unpack self-closing tags when converting domToText (#3665)
* Unpack self-closing tags when converting domToText
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user