Skip to content

Commit 3c8a609

Browse files
authored
Bugfix in SerializeValue when save format is XML
the string concat function was producing wrong xml, this change fixes it. 1. </Picker> was wrongly set as a parameter to string.Join resulting in the xml enumerable to return as a string 2. string.Join should not have a , separator as that would produce malformed xml
1 parent 456978a commit 3c8a609

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Umbraco.Deploy.Contrib.Connectors/ValueConnectors/NuPickersValueConnector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ private string SerializeValue(IEnumerable<KeyValuePair<string, string>> value, S
168168

169169
case SaveFormat.XML:
170170
var xml = value.Select(x => $"<Picked Key=\"{x.Key}\"><![CDATA[{x.Value}]]></Picked>");
171-
return string.Concat("<Picker>", string.Join(",", xml, "</Picker>"));
171+
return string.Concat("<Picker>", string.Join("", xml), "</Picker>");
172172

173173
case SaveFormat.CSV:
174174
default:

0 commit comments

Comments
 (0)