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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works here because course and library key parts (org, run, number), don't accept spaces or special characters. Otherwise, this would potentially break keys with spaces (which is not the case).
However the root cause of this issue is that we are not url-encoding the query params on the links generated in frontend-app-authoring.
If we did that, the course key would be encoded as "course-v1%3AOpenedX%2BDemoX%2BDemoCourse", and on decode, it will come back correctly here as + instead of spaces.
We can keep this change as a fallback, but I think we should fix the root cause in frontend-app-authoring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @rodmgwgu , I checked first on authoring and I saw the URL correctly there, but let me double check.
agreed that we should use encodeURI on authoring repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rodmgwgu you were right, I've added the change to this PR
openedx/frontend-app-authoring#3023
and it works correct, thanks!