Commit 96184773 authored by mrbean-bremen's avatar mrbean-bremen
Browse files

* Allow relative paths for image URLs

- relative URL have not been loaded (example: masking-path-06-b.svg in test data)
- Updated passing tests (note: not all changes are related to the current fix)
parent 0b727f1b
......@@ -242,8 +242,8 @@ namespace Svg
string safeUriString;
if (uriString.Length > 65519)
{
safeUriString = uriString.Substring(0,
65519);
//Uri MaxLength is 65519 (https://msdn.microsoft.com/en-us/library/z6c2z492.aspx)
safeUriString = uriString.Substring(0, 65519);
}
else
{
......@@ -252,7 +252,7 @@ namespace Svg
try
{
var uri = new Uri(safeUriString); //Uri MaxLength is 65519 (https://msdn.microsoft.com/en-us/library/z6c2z492.aspx)
var uri = new Uri(safeUriString, UriKind.RelativeOrAbsolute);
// handle data/uri embedded images (http://en.wikipedia.org/wiki/Data_URI_scheme)
if (uri.IsAbsoluteUri && uri.Scheme == "data")
......
color-prop-01-b.svg
color-prop-02-f.svg
color-prop-03-t.svg
color-prop-04-t.svg
color-prop-05-t.svg
coords-coord-01-t.svg
coords-coord-02-t.svg
......@@ -30,12 +29,18 @@ coords-units-03-b.svg
coords-viewattr-01-b.svg
coords-viewattr-02-b.svg
coords-viewattr-03-b.svg
fonts-elem-01-t.svg
fonts-elem-03-b.svg
fonts-overview-201-t.svg
masking-path-01-b.svg
masking-path-02-b.svg
masking-path-04-b.svg
masking-path-05-f.svg
masking-path-06-b.svg
masking-path-03-b.svg
metadata-example-01-t.svg
painting-control-04-f.svg
painting-stroke-09-t.svg
painting-stroke-10-t.svg
pservers-grad-01-b.svg
pservers-grad-02-b.svg
pservers-grad-03-b.svg
......@@ -50,7 +55,6 @@ pservers-grad-12-b.svg
pservers-grad-14-b.svg
pservers-grad-15-b.svg
pservers-grad-16-b.svg
pservers-grad-17-b.svg
pservers-grad-20-b.svg
pservers-grad-22-b.svg
pservers-grad-23-f.svg
......@@ -64,7 +68,6 @@ pservers-pattern-05-f.svg
pservers-pattern-06-f.svg
pservers-pattern-07-f.svg
pservers-pattern-08-f.svg
pservers-pattern-09-f.svg
render-elems-01-t.svg
render-elems-02-t.svg
render-elems-03-t.svg
......@@ -116,6 +119,12 @@ paths-data-20-f.svg
struct-image-01-t.svg
struct-image-04-t.svg
struct-image-06-t.svg
struct-image-09-t.svg
struct-image-10-t.svg
struct-image-13-f.svg
struct-image-14-f.svg
struct-image-15-f.svg
struct-image-17-b.svg
masking-path-13-f.svg
masking-path-14-f.svg
painting-control-01-f.svg
......@@ -126,11 +135,15 @@ painting-fill-03-t.svg
painting-fill-04-t.svg
painting-fill-05-b.svg
painting-stroke-01-t.svg
struct-defs-01-t.svg
struct-use-05-b.svg
struct-use-14-f.svg
struct-use-15-f.svg
styling-class-01-f.svg
styling-css-01-b.svg
styling-css-03-b.svg
styling-css-07-f.svg
styling-pres-01-t.svg
text-align-01-b.svg
text-align-02-b.svg
text-align-03-b.svg
......@@ -140,13 +153,13 @@ text-fonts-03-t.svg
text-fonts-05-f.svg
text-intro-04-t.svg
text-intro-06-t.svg
text-intro-07-t.svg
text-path-01-b.svg
text-path-02-b.svg
text-spacing-01-b.svg
text-text-01-b.svg
text-text-04-t.svg
text-text-05-t.svg
text-text-07-t.svg
text-text-08-b.svg
text-text-09-t.svg
text-text-10-t.svg
text-text-11-t.svg
......
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