fix: basic-web: single-quotes were not supported

Massimo Melina committed Oct 23, 2024 at 16:18 UTC e13f9baf02139831ea35dc40e278a7d9b7f9402e
1 file changed +1 -1
src/cross.ts
+1 -1
@@ -401,7 +401,7 @@ export async function promiseBestEffort<T>(promises: Promise<T>[]) {
401
402 // encode paths leaving / separator unencoded (not like encodeURIComponent), but still encode #
403 export function pathEncode(s: string) {
404 - return s.replace(/[:&#'"% ?\\]/g, encodeURIComponent)
404 + return s.replace(/[:&#'"% ?\\]/g, escape) // escape() is not utf8, but we are encoding only ascii chars
405 }
406 //unused function pathDecode(s: string) { return decodeURI(s).replace(/%23/g, '#') }
407