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

Correctly call API when searching by source URL #173

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Conversation

psrpinto
Copy link
Member

@psrpinto psrpinto commented Dec 18, 2024

Fixes #172

The API was been called incorrectly. I also took the liberty of URL-encoding the field, otherwise it could break the URL parsing, for example if sourceurl would be http://foo?bar=baz, because this would result in the following URL:

Note there are two ?

/wp-json/index.php?rest_route=/try-wp/v1/subjects/blog-post&sourceurl=http://foo?bar=baz

@psrpinto
Copy link
Member Author

psrpinto commented Dec 18, 2024

Thanks for finding the issue @ashfame!

@psrpinto psrpinto marked this pull request as ready for review December 18, 2024 14:16
@psrpinto psrpinto self-assigned this Dec 18, 2024
@psrpinto psrpinto requested a review from ashfame December 18, 2024 14:16
Copy link
Member

@ashfame ashfame left a comment

Choose a reason for hiding this comment

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

Thanks for catching that we were not encoding the url!

@psrpinto psrpinto merged commit 3ee42d3 into trunk Dec 18, 2024
3 checks passed
@psrpinto psrpinto deleted the fix-blueprint-edit branch December 18, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't find subject by source URL when calling the API
2 participants