Uri encode filenames with spaces for the media player #229

Merged
akinwale merged 1 commit from uri-encode-paths into master 2018-08-14 08:51:05 +02:00
akinwale commented 2018-08-13 11:09:21 +02:00 (Migrated from github.com)
No description provided.
neb-b (Migrated from github.com) reviewed 2018-08-13 11:09:21 +02:00
skhameneh (Migrated from github.com) approved these changes 2018-08-14 06:27:45 +02:00
skhameneh (Migrated from github.com) left a comment

Minor comment

Minor comment
@ -263,1 +263,4 @@
getEncodedDownloadPath = (fileInfo) => {
const { file_name: fileName } = fileInfo;
const encodedFileName = encodeURIComponent(fileName).replace(/!/g, '%21');
skhameneh (Migrated from github.com) commented 2018-08-14 06:27:35 +02:00

The entire set of unescaped characters is -_.!~*'(), does this need to reflect that?

The entire set of unescaped characters is `-_.!~*'()`, does this need to reflect that?
akinwale (Migrated from github.com) reviewed 2018-08-14 08:50:51 +02:00
@ -263,1 +263,4 @@
getEncodedDownloadPath = (fileInfo) => {
const { file_name: fileName } = fileInfo;
const encodedFileName = encodeURIComponent(fileName).replace(/!/g, '%21');
akinwale (Migrated from github.com) commented 2018-08-14 08:50:51 +02:00

Not necessarily. The rest of the characters can be left as is in the filename, but if we have to escape any of them in the future, we could just add an additional replace call here.

Not necessarily. The rest of the characters can be left as is in the filename, but if we have to escape any of them in the future, we could just add an additional `replace` call here.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#229
No description provided.