diff --git a/src/utils.ts b/src/utils.ts index 932d382..faddbc4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,6 @@ export function changePathVisibility(path: string, hide: boolean) { - let n = document.querySelector(`[data-path="${path}"]`); + let escapedPath = CSS.escape(path); + let n = document.querySelector(`[data-path="${escapedPath}"]`); if (!n) { return; };