From ed83449ebf1949e8fa0a69a6b2fca85e42c2593c Mon Sep 17 00:00:00 2001 From: Kevin Jump Date: Mon, 14 Oct 2019 14:21:17 +0100 Subject: [PATCH] wrap all content properties in CDATA #59 Wrapping in CDATA section should improve consistancy and preserve whitespace better. --- uSync8.ContentEdition/Serializers/ContentSerializerBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uSync8.ContentEdition/Serializers/ContentSerializerBase.cs b/uSync8.ContentEdition/Serializers/ContentSerializerBase.cs index 9d4b4d07..a1c89ca5 100644 --- a/uSync8.ContentEdition/Serializers/ContentSerializerBase.cs +++ b/uSync8.ContentEdition/Serializers/ContentSerializerBase.cs @@ -105,7 +105,7 @@ protected virtual XElement SerializeProperties(TObject item) valueNode.Add(new XAttribute("Segment", value.Segment ?? string.Empty)); } - valueNode.Value = GetExportValue(value.EditedValue, property.PropertyType, value.Culture, value.Segment); + valueNode.Add(new XCData(GetExportValue(value.EditedValue, property.PropertyType, value.Culture, value.Segment))); // valueNode.Value = value.EditedValue?.ToString() ?? string.Empty; propertyNode.Add(valueNode); }