Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when viewing scenes related to objects with illegal characters in name #395

Merged
merged 6 commits into from
Mar 13, 2020

Conversation

WithoutPants
Copy link
Collaborator

Fixes #394

Encodes ILabeledId objects so that illegal characters (#;,/?:@&=+$) don't break the query URL parsing.

Tested by creating Movies, Studios, Performers and tags with illegal characters in the names, then clicking on the query link on the relevant page. Change has been ported to UI v2.5 except for Movies, since that is not yet in 2.5.

Also includes linting and format changes for 2.5.

@WithoutPants WithoutPants added the bug Something isn't working label Mar 12, 2020
@WithoutPants WithoutPants changed the title Issues/394 Fix error when viewing scenes related to objects with illegal characters in name Mar 12, 2020
Comment on lines 26 to 29
const ret = { ...o };
ret.label = encodeURIComponent(o.label);
return ret;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just do return { ...o, label: encodeURIComponent(o.label) }. Properties are set in the order they are passed in, so even if o has a label, it will be overwrittenby encodeURIComponent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@WithoutPants WithoutPants added this to the Version 0.2.0 milestone Mar 13, 2020
@WithoutPants WithoutPants merged commit 1a6374f into stashapp:develop Mar 13, 2020
WithoutPants added a commit to WithoutPants/stash that referenced this pull request Mar 13, 2020
WithoutPants added a commit that referenced this pull request Mar 20, 2020
* Ignore generated-graphql.tsx in 2.5
* Make movie name mandatory
* Port #395 fix to v2.5
* Differentiate front/back image browse buttons
* Move URL, Synopsis to separate rows
* Fix unknown query params crashing UI
Tweeticoats pushed a commit to Tweeticoats/stash that referenced this pull request Feb 1, 2021
Tweeticoats pushed a commit to Tweeticoats/stash that referenced this pull request Feb 1, 2021
* Ignore generated-graphql.tsx in 2.5
* Make movie name mandatory
* Port stashapp#395 fix to v2.5
* Differentiate front/back image browse buttons
* Move URL, Synopsis to separate rows
* Fix unknown query params crashing UI
@WithoutPants WithoutPants deleted the issues/394 branch February 4, 2021 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] Syntax error when movies have a # symbol in the name
2 participants