From 639ef53c88d0bdb2e46f175e264fb379ffd39c18 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Thu, 5 Apr 2018 17:56:10 +0100 Subject: [PATCH] U4-9088 - Macro Container Property Type returned incorrect object-type The `PropertyValueType` attribute marks this converter as returning an `IHtmlString`, but `ConvertDataToSource` returns a `string` type. This patch corrects the return type to be a `HtmlString`. --- .../ValueConverters/MacroContainerValueConverter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MacroContainerValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MacroContainerValueConverter.cs index 436d131bcd..74ad2090ff 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MacroContainerValueConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MacroContainerValueConverter.cs @@ -12,7 +12,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters /// Ensures macro syntax is parsed for the macro container which will work when getting the field /// values in any way (i.e. dynamically, using Field(), or IPublishedContent) /// - [PropertyValueType(typeof (IHtmlString))] + [PropertyValueType(typeof(IHtmlString))] [PropertyValueCache(PropertyCacheValue.All, PropertyCacheLevel.Request)] [DefaultPropertyValueConverter] public class MacroContainerValueConverter : PropertyValueConverterBase @@ -64,7 +64,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters // ensure string is parsed for macros and macros are executed correctly sourceString = RenderMacros(sourceString, preview); - return sourceString; + return new HtmlString(sourceString); } } -} \ No newline at end of file +}