mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
[FileExplorer Add-ons][SVG thumbnail]Swap order of default and svg namespace if default comes first (#19381)
This commit is contained in:
@@ -256,6 +256,10 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
|
|||||||
svgData = reader.ReadToEnd();
|
svgData = reader.ReadToEnd();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// Fixes #17527 - Inkscape v1.1 swapped order of default and svg namespaces in svg file (default first, svg after).
|
||||||
|
// That resulted in parser being unable to parse it correctly and instead of svg, text was previewed.
|
||||||
|
// MS Edge and Firefox also couldn't preview svg files with mentioned order of namespaces definitions.
|
||||||
|
svgData = SvgPreviewHandlerHelper.SwapNamespaces(svgData);
|
||||||
svgData = SvgPreviewHandlerHelper.AddStyleSVG(svgData);
|
svgData = SvgPreviewHandlerHelper.AddStyleSVG(svgData);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
|
|||||||
Reference in New Issue
Block a user