If the SVG style-tag contains multiple CSS declarations for a class and there are white-spaces in the CSS block, the TClassStylesList.AddAppendStyle() method inserts an extra ";". This causes TXmlEl.ParseStyleAttribute() to ignore all style properties after the double ';' for that class as it expects a property name but gets the second ";".
This commit fixes this by trimming the style declaration's contents before calling AddAppendStyle(). It introduces a new ToTrimmedUTF8String() function and removes the now unused AllTrim() function.
If the SVG style-tag contains multiple CSS declarations for a class and there are white-spaces in the CSS block, the TClassStylesList.AddAppendStyle() method inserts an extra ";". This causes TXmlEl.ParseStyleAttribute() to ignore all style properties after the double ';' for that class as it expects a property name but gets the second ";".
This commit fixes this by trimming the style declaration's contents before calling AddAppendStyle(). It introduces a new ToTrimmedUTF8String() function and removes the now unused AllTrim() function.
Example SVG:
Without the patch: You see one black rectangle. classStyles.GetStyle() =
' stroke-width: 0px; ; fill: #8080ff; '
With the patch: You see two colored rectangles. classStyles.GetStyle() =
'stroke-width: 0px;fill: #8080ff;'