mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixing that the technical names of widgets couldn't contain hyphens, see #4981
This commit is contained in:
@@ -53,7 +53,7 @@ namespace Orchard.Widgets.Drivers {
|
||||
|
||||
// if there is a name, ensure it's unique
|
||||
if(!string.IsNullOrWhiteSpace(widgetPart.Name)) {
|
||||
widgetPart.Name = widgetPart.Name.ToSafeName();
|
||||
widgetPart.Name = widgetPart.Name.ToHtmlName();
|
||||
|
||||
var widgets = _contentManager.Query<WidgetPart, WidgetPartRecord>().Where(x => x.Name == widgetPart.Name && x.Id != widgetPart.Id).Count();
|
||||
if(widgets > 0) {
|
||||
|
Reference in New Issue
Block a user