test: decode URI component
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
This commit is contained in:
parent
8d3704c021
commit
33cb7e82b4
1 changed files with 3 additions and 2 deletions
|
|
@ -150,14 +150,15 @@ const parseCoordinates = (coordinatePair, query, transformer) => {
|
|||
* @param {Function} transformer Optional transform function.
|
||||
*/
|
||||
const extractPathsFromQuery = (query, transformer) => {
|
||||
const reqPath = decodeURIComponent(query.path);
|
||||
const paths = [];
|
||||
// Return an empty list if no paths have been provided
|
||||
if ('path' in query && !query.path) {
|
||||
return paths;
|
||||
}
|
||||
// Parse paths provided via path query argument
|
||||
if ('path' in query && PATH_PATTERN.test(query.path)) {
|
||||
if (query.path.includes('enc:')) {
|
||||
if ('path' in query && PATH_PATTERN.test(reqPath)) {
|
||||
if (reqPath.includes('enc:')) {
|
||||
const splitPaths = query.path.split('|');
|
||||
const line = splitPaths
|
||||
.filter(
|
||||
|
|
|
|||
Loading…
Reference in a new issue