Skip to content

Commit

Permalink
solve bug exupero#150
Browse files Browse the repository at this point in the history
  • Loading branch information
LimbaHub authored Aug 23, 2018
1 parent 9916814 commit 95f2af0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/saveSvgAsPng.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@
out$.svgAsDataUri = (el, options, done) => {
requireDomNode(el);
const result = out$.prepareSvg(el, options)
.then(({src}) => `data:image/svg+xml;base64,${window.btoa(reEncode(doctype+src))}`);
.then(({src}) =>{
src = src.replace(/(<img[^>]+)>/, "$1 ></img>");
return `data:image/svg+xml;base64,${window.btoa(reEncode(doctype+src))}`});
if (typeof done === 'function') return result.then(done);
return result;
};
Expand Down

0 comments on commit 95f2af0

Please sign in to comment.