Trailing spaces on Soundcloud URLs are not stripped

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: cade, Assigned: mjschranz)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
This is causing a lot of trouble.

STR:

1. add "https://soundcloud.com/offspring/americana " with the trailing space
2. add the clip to your project. it will not load.
(Assignee)

Updated

5 years ago
Assignee: nobody → schranz.m
Status: NEW → ASSIGNED
Comment on attachment 806115 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/209

Does not work on projects that were previously saved with trailing spaces.

Also does not work when added view the editor.

It gets more complicated too, as in the cases where it was saved incorectly, the source looks like this: 
["https://soundcloud.com/zedd/zedd-legend-of-zelda-original ?butteruid=1379442881010", ""]

It has a trailing empty source, it should not.

The space is between the url and ?butteruid, so trim is never going to catch it.

It should not have a butteruid anyway.
Attachment #806115 - Flags: review?(scott) → review-
Comment on attachment 806115 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/209

Does not fix the track event if saved in the project before this fix.
Attachment #806115 - Flags: review?(scott) → review-
Created attachment 806413 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/212

Needed to get this off my mind. It was bugging me and you seemed busier than I.

R+ on your commit plus mine.
Attachment #806413 - Flags: review?(schranz.m)
(Assignee)

Updated

5 years ago
Attachment #806413 - Attachment is obsolete: true
Attachment #806413 - Flags: review?(schranz.m)
(Assignee)

Comment 6

5 years ago
Comment on attachment 806115 [details] [review]
https://github.com/mozilla/popcorn.webmaker.org/pull/209

Updated. You missed the trim in your patch.
Attachment #806115 - Flags: review- → review?(scott)

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain text/plain → text/x-github-pull-request text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.