Skip to content

Commit 083c77d

Browse files
AbanoubNassemAbanoubkapi2289
authored
=use WebUtility.HtmlEncode instead of System.Web.HttpUtility (#5)
* =use WebUtility.HtmlEncode instead of System.Web.HttpUtility * Update InertiaCore/ResponseFactory.cs Co-authored-by: Kacper Ziubryniewicz <kacper@ziubryniewicz.pl> --------- Co-authored-by: Abanoub <abanoub@Abanoubs-MBP.lan> Co-authored-by: Kacper Ziubryniewicz <kacper@ziubryniewicz.pl>
1 parent 733bc8d commit 083c77d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

InertiaCore/ResponseFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
using System.Net;
12
using System.Text.Json;
23
using System.Text.Json.Serialization;
3-
using System.Web;
44
using InertiaCore.Extensions;
55
using InertiaCore.Ssr;
66
using Microsoft.AspNetCore.Html;
@@ -77,7 +77,7 @@ public async Task<IHtmlContent> Html(dynamic model)
7777
ReferenceHandler = ReferenceHandler.IgnoreCycles
7878
});
7979

80-
var encoded = HttpUtility.HtmlEncode(data);
80+
var encoded = WebUtility.HtmlEncode(data);
8181

8282
return new HtmlString($"<div id=\"app\" data-page=\"{encoded}\"></div>");
8383
}

0 commit comments

Comments
 (0)