allowing # in onedrive

This commit is contained in:
fyears 2024-03-30 15:39:35 +08:00
parent 593fd7471b
commit 1c918d82da

View File

@ -471,6 +471,11 @@ export class WrappedOnedriveClient {
const pathFrag = encodeURI(pathFragOrig); const pathFrag = encodeURI(pathFragOrig);
theUrl = `${API_PREFIX}${pathFrag}`; theUrl = `${API_PREFIX}${pathFrag}`;
} }
// we want to support file name with hash #
// because every url we construct here do not contain the # symbol
// thus it should be safe to directly replace the character
theUrl = theUrl.replace(/#/g, "%23");
// console.debug(`building url: [${pathFragOrig}] => [${theUrl}]`)
return theUrl; return theUrl;
}; };