0
0
Fork 0

Issue-25 Added escapedPath to changePathVisibility to handle carriage return (\r) and other invalid querySelector paths characters.

This commit is contained in:
drfloyd5 2023-02-14 19:52:42 -05:00
parent b9b3e89660
commit 5535e07bb8

View file

@ -1,5 +1,6 @@
export function changePathVisibility(path: string, hide: boolean) { 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) { if (!n) {
return; return;
}; };