From e849b75e104c123523209e51e332a37c337b5da3 Mon Sep 17 00:00:00 2001 From: kitfox Date: Sat, 30 Jun 2012 23:29:48 +0000 Subject: Can now safely update trees that contain embedded images. git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@114 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b --- src/main/java/com/kitfox/svg/ImageSVG.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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)) { -- cgit v1.2.3-55-g7522