pad decoded percent escapes to two hex digits
This commit is contained in:
+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