diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6b62fb9f..beedf4e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
- bug fixes
- editor: issue with tabs selection / edition
+ - regression breaking `svg`
## 0.40.0
diff --git a/src/client/app/widgets/plots/svg.js b/src/client/app/widgets/plots/svg.js
index fe1b8839..bc902dbd 100644
--- a/src/client/app/widgets/plots/svg.js
+++ b/src/client/app/widgets/plots/svg.js
@@ -14,7 +14,7 @@ class Svg extends Widget {
svg: {type: 'string', value: '', help: [
'Svg xml definition:',
- '- will be wrapped in a `` element',
+ '- will be wrapped in a `< svg />` element',
'- `` commands support a special percent notation (`%x` and `%y`)'
]}
@@ -48,8 +48,13 @@ class Svg extends Widget {
svg = svg.replace(/([0-9.]+%y)/gi, m=>(parseFloat(m) * this.height / 100).toFixed(2))
+ var newSvg = html``,
+ node = html`${newSvg}
`
+
+ newSvg.innerHTML = svg
+
+ morph(this.widget, node)
- morph(this.widget, html``)
}
resizeHandleProxy() {