BC-5850 - Team members can not be removed if they uploaded a file with whitespace #3356
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently it is not possible to remove a team member from that team if he/she uploaded/created a file in that team that contains a whitespace in the filename.
Why?
When loading the team members list, each members does contain a data-payload which also contains an array of files of that user (needed to display the this-users-files-will-also-get-deleted-info-popup). Files with whitespace break this encoded array and break the HTML, which prevents the userId from getting sent with the DELETE webrequest.
Links to Tickets or other pull requests
BC-5850
Changes
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent
Approval for review