diff --git a/src/svg/SVGImport.js b/src/svg/SVGImport.js index b75a0bd1..95cbf6e8 100644 --- a/src/svg/SVGImport.js +++ b/src/svg/SVGImport.js @@ -449,6 +449,8 @@ new function() { } function importSVG(node, clearDefs) { + if (typeof node === 'string') + node = new DOMParser().parseFromString(node, 'image/svg+xml'); // jsdom in Node.js uses uppercase values for nodeName... var type = node.nodeName.toLowerCase(), importer = importers[type],