fix: safely decode URI Component

Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
This commit is contained in:
Vinayak Kulkarni 2023-01-11 16:38:41 +05:30
parent 52958a2317
commit 3417bd2df6
No known key found for this signature in database
GPG key ID: B8C8194CED989C08

View file

@ -542,10 +542,10 @@ const drawPath = (ctx, path, query, z) => {
// Check if path in query is valid
if (Array.isArray(query.path)) {
for (let i = 0; i < query.path.length; i += 1) {
renderPath(query.path.at(i).split('|'));
renderPath(decodeURIComponent(query.path.at(i)).split('|'));
}
} else {
renderPath(query.path.split('|'));
renderPath(decodeURIComponent(query.path).split('|'));
}
};