fix(core): escape special characters for cmdk item values (#5353)

This commit is contained in:
@@ -168,14 +168,15 @@ export const pageToCommand = (
|
|||||||
|
|
||||||
// hack: when comparing, the part between >>> and <<< will be ignored
|
// hack: when comparing, the part between >>> and <<< will be ignored
|
||||||
// adding this patch so that CMDK will not complain about duplicated commands
|
// adding this patch so that CMDK will not complain about duplicated commands
|
||||||
const id =
|
const id = CSS.escape(
|
||||||
title +
|
title +
|
||||||
(label?.subTitle || '') +
|
(label?.subTitle || '') +
|
||||||
valueWrapperStart +
|
valueWrapperStart +
|
||||||
page.id +
|
page.id +
|
||||||
'.' +
|
'.' +
|
||||||
category +
|
category +
|
||||||
valueWrapperEnd;
|
valueWrapperEnd
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
|
|||||||
Reference in New Issue
Block a user