summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/kitfox/svg/ImageSVG.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/com/kitfox/svg/ImageSVG.java b/src/main/java/com/kitfox/svg/ImageSVG.java
index eb25586..cfe3309 100644
--- a/src/main/java/com/kitfox/svg/ImageSVG.java
+++ b/src/main/java/com/kitfox/svg/ImageSVG.java
@@ -254,7 +254,16 @@ public class ImageSVG extends RenderableElement
if (getPres(sty.setName("xlink:href")))
{
URI src = sty.getURIValue(getXMLBase());
- URL newVal = src.toURL();
+
+ URL newVal;
+ if ("data".equals(src.getScheme()))
+ {
+ newVal = new URL(null, src.toASCIIString(), new Handler());
+ }
+ else
+ {
+ newVal = src.toURL();
+ }
if (!newVal.equals(imageSrc))
{