mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-29 05:54:55 +03:00
fix(core): escape special characters for cmdk item values (#5353)
![image](https://github.com/toeverything/AFFiNE/assets/102217452/301ef02e-f0df-4a1b-843f-240cad44af0f)
This commit is contained in:
parent
a4f31df192
commit
9981c24120
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user