diff --git a/src/Providers/DataGrid/Wijmo/Features/ContextMenu.ts b/src/Providers/DataGrid/Wijmo/Features/ContextMenu.ts index 0d2c5c91..37dd84ef 100644 --- a/src/Providers/DataGrid/Wijmo/Features/ContextMenu.ts +++ b/src/Providers/DataGrid/Wijmo/Features/ContextMenu.ts @@ -339,7 +339,12 @@ namespace Providers.DataGrid.Wijmo.Feature { const menuItem = this._menuItems.get(menuItemId); if (menuItem) { if (menuItem.hasOwnProperty(propertyName)) { - menuItem[propertyName] = propertyValue; + if (propertyName === 'label' && this.grid.config.sanitizeInputValues) { + // Sanitize the label if the configuration is set to do so + menuItem.label = OSFramework.DataGrid.Helper.Sanitize(propertyValue as string); + } else { + menuItem[propertyName] = propertyValue; + } } else { console.error(`MenuItem "${menuItem.label}" has no property "${propertyName}" defined.`); }