From 8967193bb9c25f04fe61517c6cfd25821b868cf5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrg=20Lehni?= <juerg@scratchdisk.com>
Date: Sun, 27 Dec 2015 19:56:14 +0100
Subject: [PATCH] Improve SVG definition id parsing.

Closes #666
---
 src/svg/SVGImport.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/svg/SVGImport.js b/src/svg/SVGImport.js
index b78f0a75..b8e11f1b 100644
--- a/src/svg/SVGImport.js
+++ b/src/svg/SVGImport.js
@@ -532,8 +532,9 @@ new function() {
     var definitions = {};
     function getDefinition(value) {
         // When url() comes from a style property, '#'' seems to be missing on
-        // WebKit, so let's make it optional here:
-        var match = value && value.match(/\((?:#|)([^)']+)/);
+        // WebKit. We also get variations of quotes or no quotes, single or
+        // double, so handle it all with one regular expression:
+        var match = value && value.match(/\((?:["'#]*)([^"')]+)/);
         return match && definitions[match[1]];
     }