Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Docs/articles/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ The release versions are NuGet releases.

### Changes
* Removed support for unsupported .NET 6 and .NET 7, added support for .NET 9. (see [PR #1192](https://github.com/svg-net/SVG/pull/1192))
* Fixes SVG rendering with invalid syntax, i.e. `fill="url(foo"` where url is not closed properly. (see [PR #1196](https://github.com/svg-net/SVG/pull/1196))

### Enhancements
* Added support for `Switch` element with "systemLanguage" selector attribute (see [#1176](https://github.com/svg-net/SVG/issues/1176)).
Expand Down
7 changes: 6 additions & 1 deletion Source/Painting/SvgPaintServerFactory.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
Expand Down Expand Up @@ -32,6 +32,11 @@ public static SvgPaintServer Create(string value, SvgDocument document)
else if (colorValue.StartsWith("url(", StringComparison.OrdinalIgnoreCase))
{
var nextIndex = colorValue.IndexOf(')', 4) + 1;

// Malformed url, missing closing parenthesis
if (nextIndex == 0)
return new SvgDeferredPaintServer(colorValue + ")", null);

var id = colorValue.Substring(0, nextIndex);

colorValue = colorValue.Substring(nextIndex).Trim();
Expand Down
Loading