diff --git a/src/snapshot/svgtoimg.js b/src/snapshot/svgtoimg.js index 05eddab673e..f90e4bb386b 100644 --- a/src/snapshot/svgtoimg.js +++ b/src/snapshot/svgtoimg.js @@ -35,7 +35,7 @@ function svgToImg(opts) { // url in svg are single quoted // since we changed double to single // we'll need to change these to double-quoted - svg = svg.replace(/(\('#)(.*)('\))/gi, '(\"$2\")'); + svg = svg.replace(/(\('#)([^']*)('\))/gi, '(\"$2\")'); // font names with spaces will be escaped single-quoted // we'll need to change these to double-quoted svg = svg.replace(/(\\')/gi, '\"');