mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-26 02:35:58 +08:00
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
|
||||
// adding this patch so that CMDK will not complain about duplicated commands
|
||||
const id =
|
||||
const id = CSS.escape(
|
||||
title +
|
||||
(label?.subTitle || '') +
|
||||
valueWrapperStart +
|
||||
page.id +
|
||||
'.' +
|
||||
category +
|
||||
valueWrapperEnd;
|
||||
(label?.subTitle || '') +
|
||||
valueWrapperStart +
|
||||
page.id +
|
||||
'.' +
|
||||
category +
|
||||
valueWrapperEnd
|
||||
);
|
||||
|
||||
return {
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user