nytimes / svg-crowbar

Extracts an SVG node and accompanying styles from an HTML document and allows you to download it all as an SVG file.
https://nytimes.github.io/svg-crowbar/
MIT License
839 stars 153 forks source link

Generated SVG is missing xmlns and xmlns:xlink attributes. #2

Closed mbostock closed 11 years ago

mbostock commented 11 years ago

I noticed this while trying to crowbar the following SVGs:

http://bl.ocks.org/mbostock/raw/3795544/

The resulting SVG files svg elements appeared as:

<svg width="320" height="500" version="1.1">

However, the desired result includes xmlns and xmlns:xlink attributes:

<svg width="320" height="500" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

Without these attributes, the SVG will not display properly.

shancarter commented 11 years ago

Thanks, should be fixed now