OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

StartsWith is culture-aware and missing a stringcomparison argument in Navigation Module(AdminController) #8109

Open abhishekluv opened 6 years ago

abhishekluv commented 6 years ago

var menuItems = _menuService.GetMenuParts(menuPart.Menu.Id) .Where(x => x.MenuPosition.StartsWith(menuPart.MenuPosition + ".")) .Select(x => x.As<MenuPart>()) .ToList();

StartsWith is culture-aware and missing a stringcomparison argument. Is it necessary to pass the StringComparison argument?

sebastienros commented 6 years ago

Can you provide a repro of the issue? I'd like to understand what the problem is, even though adding a String comparison should be fine.