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: Incorrect results when ParseQuery contains special characters #866

Merged
merged 8 commits into from May 29, 2023

Conversation

Nidal-Bakir
Copy link
Member

@Nidal-Bakir Nidal-Bakir commented Apr 14, 2023

New Pull Request Checklist

Issue Description

Closes: #841

Approach

use Uri.encodeComponent(URLComponent);

This will produce an encoded query value:
?where={"Name":"AB%2BAB"}
The encoded equivalent of:
?where={"Name": "AB+AB"}

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)
  • A changelog entry

@parse-github-assistant
Copy link

parse-github-assistant bot commented Apr 14, 2023

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Patch coverage: 85.71% and project coverage change: +0.98 🎉

Comparison is base (4e4bfab) 38.51% compared to head (b0a8901) 39.50%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #866      +/-   ##
==========================================
+ Coverage   38.51%   39.50%   +0.98%     
==========================================
  Files          60       60              
  Lines        3331     3339       +8     
==========================================
+ Hits         1283     1319      +36     
+ Misses       2048     2020      -28     
Impacted Files Coverage Δ
packages/dart/lib/src/network/parse_query.dart 45.07% <85.71%> (+12.65%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Nidal-Bakir Nidal-Bakir marked this pull request as draft April 14, 2023 17:40
@Nidal-Bakir
Copy link
Member Author

Nidal-Bakir commented Apr 14, 2023

I will await for my other PR (#860) to be merged to see all the added tests and changes.

@Nidal-Bakir Nidal-Bakir changed the title fix: ParseQuery fails when query contains special characters fix: ParseQuery does not return the correct result when a query contains special characters Apr 15, 2023
@Nidal-Bakir Nidal-Bakir marked this pull request as ready for review May 26, 2023 17:59
@Nidal-Bakir
Copy link
Member Author

@parse-community/flutter-sdk-review

This is ready.

mbfakourii
mbfakourii previously approved these changes May 28, 2023
Copy link
Member

@mbfakourii mbfakourii left a comment

Choose a reason for hiding this comment

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

Everything looks good

@mtrezza mtrezza changed the title fix: ParseQuery does not return the correct result when a query contains special characters fix: Incorrect results when ParseQuery contains special characters May 29, 2023
packages/dart/CHANGELOG.md Outdated Show resolved Hide resolved
packages/dart/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good!

@mtrezza mtrezza merged commit 63fb586 into parse-community:master May 29, 2023
15 checks passed
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.

ParseQuery fails when query contains + character
3 participants