diff --git a/include/wx/dcsvg.h b/include/wx/dcsvg.h
index 6b1b0fdd72..63ebb96463 100644
--- a/include/wx/dcsvg.h
+++ b/include/wx/dcsvg.h
@@ -16,7 +16,7 @@
#if wxUSE_SVG
-#define wxSVGVersion wxT("v0100")
+#define wxSVGVersion wxT("v0101")
#ifdef __BORLANDC__
#pragma warn -8008
diff --git a/src/common/dcsvg.cpp b/src/common/dcsvg.cpp
index c35129be85..a26754f2c9 100644
--- a/src/common/dcsvg.cpp
+++ b/src/common/dcsvg.cpp
@@ -294,9 +294,7 @@ wxSVGBitmapEmbedHandler::ProcessBitmap(const wxBitmap& bmp,
// write image meta information
wxString s;
- s += wxString::Format(" "; // last line
+ s += data.Mid(i, s.size() - i) + "\"\n />\n"; // last line
}
// write to the SVG file
@@ -349,11 +347,9 @@ wxSVGBitmapFileHandler::ProcessBitmap(const wxBitmap& bmp,
// reference the bitmap from the SVG doc
wxString s;
- s += wxString::Format(" \n\n", sPNG);
+ s += wxString::Format(" xlink:href=\"%s\"/>\n", sPNG);
// write to the SVG file
const wxCharBuffer buf = s.utf8_str();
@@ -421,21 +417,13 @@ void wxSVGFileDCImpl::Init (const wxString &filename, int Width, int Height,
m_filename = filename;
m_sub_images = 0;
wxString s;
- s = wxT("\n");
- write(s);
- s = wxT("\n");
- write(s);
- s = wxT("