diff options
author | Joshua Walsh <josh@ymindustries.com> | 2017-10-23 11:12:27 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 11:12:27 +1100 |
commit | 30562e8d2417ccd9a1bf6bba0ac94f9e299e8fee (patch) | |
tree | b7db59e815934998e9b525a90d0498b9886c5e5e /src | |
parent | 22d7012bf3bc731c470f6b26651aec93fde04dcc (diff) | |
download | svg.js-30562e8d2417ccd9a1bf6bba0ac94f9e299e8fee.tar.gz svg.js-30562e8d2417ccd9a1bf6bba0ac94f9e299e8fee.zip |
Correctly handle namespaced self-closing tags
Fixes #754
Diffstat (limited to 'src')
-rw-r--r-- | src/element.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/element.js b/src/element.js index 8f412ad..a21e29c 100644 --- a/src/element.js +++ b/src/element.js @@ -215,7 +215,7 @@ SVG.Element = SVG.invent({ // act as a setter if svg is given if (svg && this instanceof SVG.Parent) { // dump raw svg - well.innerHTML = '<svg>' + svg.replace(/\n/, '').replace(/<(\w+)([^<]+?)\/>/g, '<$1$2></$1>') + '</svg>' + well.innerHTML = '<svg>' + svg.replace(/\n/, '').replace(/<([\w:]+)([^<]+?)\/>/g, '<$1$2></$1>') + '</svg>' // transplant nodes for (var i = 0, il = well.firstChild.childNodes.length; i < il; i++) |