aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoshua Walsh <josh@ymindustries.com>2017-10-23 11:12:27 +1100
committerGitHub <noreply@github.com>2017-10-23 11:12:27 +1100
commit30562e8d2417ccd9a1bf6bba0ac94f9e299e8fee (patch)
treeb7db59e815934998e9b525a90d0498b9886c5e5e /src
parent22d7012bf3bc731c470f6b26651aec93fde04dcc (diff)
downloadsvg.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.js2
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++)