diff --git a/src/OrchardCore/OrchardCore.DisplayManagement/Html/HtmlContentString.cs b/src/OrchardCore/OrchardCore.DisplayManagement/Html/HtmlContentString.cs index 15ea0afe43c..75663cbef69 100644 --- a/src/OrchardCore/OrchardCore.DisplayManagement/Html/HtmlContentString.cs +++ b/src/OrchardCore/OrchardCore.DisplayManagement/Html/HtmlContentString.cs @@ -27,7 +27,7 @@ public class HtmlContentString : IHtmlContent private string DebuggerToString() { - var writer = new ZStringWriter(); + using var writer = new ZStringWriter(); WriteTo(writer, HtmlEncoder.Default); return writer.ToString(); }