From db867c66a3508591211871cd1341929885df2a8c Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 3 Apr 2019 13:32:21 +1100 Subject: [PATCH] The ImageCropperPropertyValueEditor doesn't convert values in ConvertDbToString correctly --- .../PropertyEditors/ImageCropperPropertyValueEditor.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs index 7bea54252132..e5d98804be74 100644 --- a/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs +++ b/src/Umbraco.Web/PropertyEditors/ImageCropperPropertyValueEditor.cs @@ -174,7 +174,12 @@ public override string ConvertDbToString(PropertyType propertyType, object value // more magic here ;-( var configuration = dataTypeService.GetDataType(propertyType.DataTypeId).ConfigurationAs(); var crops = configuration?.Crops ?? Array.Empty(); - return "{src: '" + val + "', crops: " + crops + "}"; + + return JsonConvert.SerializeObject(new + { + src = val, + crops = crops + }); } } }