Skip to content

Commit

Permalink
Fixes invalid cookie name (#14280)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludovic-th authored Sep 8, 2023
1 parent 007e30f commit 9cd2398
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.WebUtilities;
using OrchardCore.Environment.Shell.Scope;
Expand Down Expand Up @@ -129,7 +130,7 @@ private static void ApplySelection(dynamic parentShape, ViewContext viewContext)
// Apply the selection to the hierarchy
if (selectedItem != null)
{
viewContext.HttpContext.Response.Cookies.Append(selectedItem.Menu.MenuName + '_' + ShellScope.Context.Settings.Name, selectedItem.Hash);
viewContext.HttpContext.Response.Cookies.Append(HttpUtility.UrlEncode($"{selectedItem.Menu.MenuName}_{ShellScope.Context.Settings.Name}"), selectedItem.Hash);

while (selectedItem.Parent != null)
{
Expand Down

0 comments on commit 9cd2398

Please sign in to comment.