diff --git a/notebook/static/notebook/js/outputarea.js b/notebook/static/notebook/js/outputarea.js index c3a42e21a..f04f73577 100644 --- a/notebook/static/notebook/js/outputarea.js +++ b/notebook/static/notebook/js/outputarea.js @@ -650,8 +650,9 @@ define([ var type = 'image/svg+xml'; var toinsert = this.create_output_subarea(md, "output_svg", type); - // Get the svg element from within the HTML. - var svg = $('').html(svg_html); + // Get the svg element from within the HTML. + // One svg is supposed, but could embed other nested svgs + var svg = $($('
').html(svg_html).find('svg')[0]); var svg_area = $('
'); var width = svg.attr('width'); var height = svg.attr('height');