Escape > with > and quotes with " in style attribute (#28762)

This commit is contained in:
Stefan Markovic
2023-09-25 15:24:25 +02:00
committed by GitHub
parent 1964aa6cce
commit d8ffa36bc6

View File

@@ -210,7 +210,7 @@ namespace Common.Utilities
// max-width and max-height not supported. Extra CSS is needed for it to work.
string scaling = $"max-width: {width} ; max-height: {height} ;";
scaling += $" _height:expression(this.scrollHeight > {heightR} ? \" {height}\" : \"auto\"); _width:expression(this.scrollWidth > {widthR} ? \"{width}\" : \"auto\");";
scaling += $" _height:expression(this.scrollHeight > {heightR} ? " {height}" : "auto"); _width:expression(this.scrollWidth > {widthR} ? "{width}" : "auto");";
string newStyle = $"style=\"{scaling}{centering}{oldStyle}\"";
int insertAt = stringSvgData.IndexOf(">", StringComparison.InvariantCultureIgnoreCase);