diff --git a/src/MAOToolkit.Web/Extensions/HtmlContentExtensions.cs b/src/MAOToolkit.Web/Extensions/HtmlContentExtensions.cs index 546cd42..d7c5b57 100644 --- a/src/MAOToolkit.Web/Extensions/HtmlContentExtensions.cs +++ b/src/MAOToolkit.Web/Extensions/HtmlContentExtensions.cs @@ -1,15 +1,18 @@ using System.Text.Encodings.Web; +using System.Text.Unicode; using Microsoft.AspNetCore.Html; namespace MAOToolkit.Extensions { public static class HtmlContentExtensions { + private static readonly HtmlEncoder UnicodeHtmlEncoder = HtmlEncoder.Create(UnicodeRanges.All); + public static string GetString(this IHtmlContent content) { using (var writer = new StringWriter()) { - content.WriteTo(writer, HtmlEncoder.Default); + content.WriteTo(writer, UnicodeHtmlEncoder); return writer.ToString(); } } diff --git a/src/MAOToolkit.Web/MAOToolkit.Web.csproj b/src/MAOToolkit.Web/MAOToolkit.Web.csproj index cfeb246..9d286bf 100644 --- a/src/MAOToolkit.Web/MAOToolkit.Web.csproj +++ b/src/MAOToolkit.Web/MAOToolkit.Web.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable true diff --git a/src/MAOToolkit/MAOToolkit.csproj b/src/MAOToolkit/MAOToolkit.csproj index 07d0c05..bc21957 100644 --- a/src/MAOToolkit/MAOToolkit.csproj +++ b/src/MAOToolkit/MAOToolkit.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable true diff --git a/src/global.json b/src/global.json new file mode 100644 index 0000000..a27a2b8 --- /dev/null +++ b/src/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "9.0.0", + "rollForward": "latestMajor", + "allowPrerelease": false + } +} \ No newline at end of file