Commit 11d63ae2 authored by Andreas Niedermair's avatar Andreas Niedermair
Browse files

fixed SvgImage.GetImage

parent 3bb22f1e
......@@ -234,9 +234,22 @@ namespace Svg
protected object GetImage(string uriString)
{
var uriString = this.Href;
string safeUriString;
if (uriString.Length > 65519)
{
safeUriString = uriString.Substring(0,
65519);
}
else
{
safeUriString = uriString;
}
try
{
var uri = new Uri(uriString.Substring(0, 65519)); //Uri MaxLength is 65519 (https://msdn.microsoft.com/en-us/library/z6c2z492.aspx)
var uri = new Uri(safeUriString); //Uri MaxLength is 65519 (https://msdn.microsoft.com/en-us/library/z6c2z492.aspx)
// handle data/uri embedded images (http://en.wikipedia.org/wiki/Data_URI_scheme)
if (uri.IsAbsoluteUri && uri.Scheme == "data")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment