diff --git a/FluentEmail.MailerSend.Tests/FluentEmail.MailerSend.Tests.csproj b/FluentEmail.MailerSend.Tests/FluentEmail.MailerSend.Tests.csproj index 9a0fc16..9f9615c 100644 --- a/FluentEmail.MailerSend.Tests/FluentEmail.MailerSend.Tests.csproj +++ b/FluentEmail.MailerSend.Tests/FluentEmail.MailerSend.Tests.csproj @@ -11,13 +11,13 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/FluentEmail.MailerSend/FluentEmail.MailerSend.csproj b/FluentEmail.MailerSend/FluentEmail.MailerSend.csproj index 1664e18..81b2a0c 100644 --- a/FluentEmail.MailerSend/FluentEmail.MailerSend.csproj +++ b/FluentEmail.MailerSend/FluentEmail.MailerSend.csproj @@ -10,7 +10,7 @@ Marco Ribeiro jcamp.FluentEmail.MailerSend - 1.1.0 + 1.1.1 mailersend;email;razor;liquid;fluent;fluentemail MIT OR Apache-2.0 diff --git a/FluentEmail.MailerSend/MailerSendSender.cs b/FluentEmail.MailerSend/MailerSendSender.cs index 553c8c9..d8ddfb6 100644 --- a/FluentEmail.MailerSend/MailerSendSender.cs +++ b/FluentEmail.MailerSend/MailerSendSender.cs @@ -4,6 +4,7 @@ using FluentEmail.MailerSend.Utils; using System.Net.Http.Headers; using System.Net.Http.Json; +using System.Text.Encodings.Web; using System.Text.Json; using System.Text.Json.Serialization; @@ -43,6 +44,7 @@ public async Task SendAsync(IFluentEmail email, CancellationToken? private static JsonSerializerOptions JsonSerializerOptions => new() { PropertyNamingPolicy = new SnakeCaseNamingPolicy(), - DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull + DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, + Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping }; }