{"action":"created","issue":{"url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/22","labels_url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/22/comments","events_url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/22/events","html_url":"https://github.com/exupero/saveSvgAsPng/issues/22","id":54075342,"number":22,"title":"<image> with no href, repeated xlink:href, angular attributes","user":{"login":"chrishutchinson","id":1573022,"avatar_url":"https://avatars.githubusercontent.com/u/1573022?v=3","gravatar_id":"","url":"https://api.github.com/users/chrishutchinson","html_url":"https://github.com/chrishutchinson","followers_url":"https://api.github.com/users/chrishutchinson/followers","following_url":"https://api.github.com/users/chrishutchinson/following{/other_user}","gists_url":"https://api.github.com/users/chrishutchinson/gists{/gist_id}","starred_url":"https://api.github.com/users/chrishutchinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrishutchinson/subscriptions","organizations_url":"https://api.github.com/users/chrishutchinson/orgs","repos_url":"https://api.github.com/users/chrishutchinson/repos","events_url":"https://api.github.com/users/chrishutchinson/events{/privacy}","received_events_url":"https://api.github.com/users/chrishutchinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-12T16:37:17Z","updated_at":"2015-05-14T18:41:06Z","closed_at":null,"body":"Apologies for the long title, I have a few small issues with this library. I've managed to integrate it about 80% with my project, but am struggling to get the final pieces sorted.\r\n\r\nI'm building a tool to wrap up snap.svg into a nice editor, and need to export the built SVG as PNG.\r\n\r\nThe first issue re. Angular is the same as issue #11 - which I am still having trouble with.\r\n\r\nIn regards to the other issues, in the case of my project, it is possible an <image> tag could have no `href` attribute, which is causing an issue when saveSvgAsPng is looking for images within the SVG element. Additionally, my project allows images to be streamed in as dataURIs, and I am getting an issue where the `xlink:href` attribute is repeated. I've done my own debugging with the script to get to the xlink error, a screenshot of trying to load the outputted data URI directly is below.\r\n\r\n![screen shot 2015-01-12 at 16 36 14](https://cloud.githubusercontent.com/assets/1573022/5706481/3702d402-9a79-11e4-9ed9-62d01afbe73b.png)\r\n\r\nI'm wondering if it's due to the way snap.svg adds images to the SVG element, and if line 34 of saveSvgAsPng is contributing to the issue.\r\n\r\nYou can view my project in it's current form here - http://times.github.io/cardkit-v2/#/ - codebase is here - https://github.com/times/cardkit-v2."},"comment":{"url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/comments/102131795","html_url":"https://github.com/exupero/saveSvgAsPng/issues/22#issuecomment-102131795","issue_url":"https://api.github.com/repos/exupero/saveSvgAsPng/issues/22","id":102131795,"user":{"login":"danswick","id":2365503,"avatar_url":"https://avatars.githubusercontent.com/u/2365503?v=3","gravatar_id":"","url":"https://api.github.com/users/danswick","html_url":"https://github.com/danswick","followers_url":"https://api.github.com/users/danswick/followers","following_url":"https://api.github.com/users/danswick/following{/other_user}","gists_url":"https://api.github.com/users/danswick/gists{/gist_id}","starred_url":"https://api.github.com/users/danswick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danswick/subscriptions","organizations_url":"https://api.github.com/users/danswick/orgs","repos_url":"https://api.github.com/users/danswick/repos","events_url":"https://api.github.com/users/danswick/events{/privacy}","received_events_url":"https://api.github.com/users/danswick/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T18:41:06Z","updated_at":"2015-05-14T18:41:06Z","body":"I had the same issue. Changed both instances of `xlink:href` (lines 18 and 34) to just `href` and everything worked as expected.\r\n\r\n@SamWhitby, I tested your solution and it worked as well and seems to be a better and more explicit solution. Thanks. "}}