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 #4336 - Encode searchTerm in BCL (including spaces, not only "+" signs) #4337

Merged
merged 6 commits into from
Jun 3, 2021

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Jun 1, 2021

Pull request overview

Fix #4336 - Encode searchTerm in BCL (including spaces, not only "+" signs)

The Cpprestsdk documentation is not great (and I couldn't find any post on stackoverflow), but I found a function that does just what's expected.

https://microsoft.github.io/cpprestsdk/classweb_1_1uri.html#ac1a92ee41ad0e77e262a8b4fcb235ac1

Also bumped the conan.cmake to v0.16.1

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

Comment on lines 642 to 644
// web::uri::encode_data_string will Encodes a string by converting all characters
// except for RFC 3986 unreserved characters to their hexadecimal representation. (eg: '+' => %2B, ' ' => %20)
auto query = searchTerm.empty() ? "*" : web::uri::encode_data_string(searchTerm);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same change as this one repeated.

Comment on lines +9 to +10
set(CMAKE_CONAN_EXPECTED_HASH 170c3250029af321395135a3952a9045)
set(CMAKE_CONAN_VERSION "v0.16.1")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bump conan.cmake

@jmarrec jmarrec force-pushed the 4336_BCL_searchTerm_encode branch from 7c684bd to 3ce0b2f Compare June 1, 2021 00:31
@tijcolem tijcolem added the Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. label Jun 1, 2021
Copy link
Collaborator

@tijcolem tijcolem 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 to me. Thanks for making windows happy =)

@tijcolem tijcolem merged commit 9f51dd2 into develop Jun 3, 2021
@tijcolem tijcolem deleted the 4336_BCL_searchTerm_encode branch June 3, 2021 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component - Utilities Other Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. severity - Normal Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BCL searchMeasureLibrary should encode spaces in the pattern
3 participants