diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-02-10 01:34:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-10 01:34:04 +0100 |
commit | 5f813d43bf737ee3d05ff64784879de1671d603e (patch) | |
tree | 3a075cd5d7dd1bcd0c256d3eea29cbb2938a4a7f /src | |
parent | f09e09732d7eb4c3dd03b665118db63fca04d163 (diff) | |
parent | 9a9195bafc13339ba2aafde5b7222dce25eb7483 (diff) | |
download | svg.js-5f813d43bf737ee3d05ff64784879de1671d603e.tar.gz svg.js-5f813d43bf737ee3d05ff64784879de1671d603e.zip |
Merge pull request #755 from YMIndustries/master
Correctly handle namespaced self-closing tags
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..ea8fedb 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++) |