pad decoded percent escapes to two hex digits
This commit is contained in:
1 parent
bdc3c33026
commit
084b5c665c
1 file changed
+1
-1
+1
-1
@@ -486,7 +486,7 @@ export function decompress (input, alphabet) {
|
|||||||
path += digit;
|
path += digit;
|
||||||
if (digit === "%") {
|
if (digit === "%") {
|
||||||
const byte = number % 256n;
|
const byte = number % 256n;
|
||||||
path += byte.toString(16);
|
path += byte.toString(16).padStart(2, "0");
|
||||||
number /= 256n;
|
number /= 256n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user