From 30562e8d2417ccd9a1bf6bba0ac94f9e299e8fee Mon Sep 17 00:00:00 2001 From: Joshua Walsh Date: Mon, 23 Oct 2017 11:12:27 +1100 Subject: Correctly handle namespaced self-closing tags Fixes #754 --- src/element.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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.replace(/\n/, '').replace(/<(\w+)([^<]+?)\/>/g, '<$1$2>') + '' + well.innerHTML = '' + svg.replace(/\n/, '').replace(/<([\w:]+)([^<]+?)\/>/g, '<$1$2>') + '' // transplant nodes for (var i = 0, il = well.firstChild.childNodes.length; i < il; i++) -- cgit v1.2.3