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

Backslash handling in suggestions #843

Merged
merged 11 commits into from
Nov 17, 2022
Merged

Conversation

veloman-yunkan
Copy link
Collaborator

Fixes #842.
Depends on openzim/libzim#740.

The fix of #842 is quite small (as illustrated by the commit titled "Fixed handling of backslashes in suggestions") however properly testing it was problematic for the lack of necessary data in the available test ZIM files. The solution to that challenge was to extract the functionality into a separate utility that could be unit-tested. That's what is mostly done in this PR.

@veloman-yunkan
Copy link
Collaborator Author

CI fails because of the dependence of this PR on openzim/libzim#740

Copy link
Member

@mgautierfr mgautierfr left a comment

Choose a reason for hiding this comment

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

A tiny change (no need for fixup commit) but else nothing to say, Pr is good.

src/tools/otherTools.cpp Show resolved Hide resolved
@mgautierfr mgautierfr force-pushed the backslash_handling_in_suggestions branch from e26e23f to dda632d Compare November 16, 2022 16:19
@codecov
Copy link

codecov bot commented Nov 16, 2022

Codecov Report

Base: 70.87% // Head: 70.98% // Increases project coverage by +0.11% 🎉

Coverage data is based on head (d66cc62) compared to base (6285599).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #843      +/-   ##
==========================================
+ Coverage   70.87%   70.98%   +0.11%     
==========================================
  Files          53       53              
  Lines        3667     3681      +14     
  Branches     2035     2042       +7     
==========================================
+ Hits         2599     2613      +14     
  Misses       1066     1066              
  Partials        2        2              
Impacted Files Coverage Δ
src/server/internalServer.cpp 88.52% <100.00%> (-0.41%) ⬇️
src/tools/otherTools.cpp 84.16% <100.00%> (+6.25%) ⬆️
src/tools/otherTools.h 87.50% <100.00%> (+1.78%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@veloman-yunkan veloman-yunkan force-pushed the backslash_handling_in_suggestions branch from dda632d to 7743e73 Compare November 17, 2022 07:52
@veloman-yunkan
Copy link
Collaborator Author

Simply rebased after #839 was merged.

@kelson42
Copy link
Collaborator

We should fix the macos CI problem the same way it has been done yesterday on openzim/libzim.

@kelson42 kelson42 force-pushed the backslash_handling_in_suggestions branch 2 times, most recently from 7e3d841 to 06c3eb7 Compare November 17, 2022 10:36
@kelson42
Copy link
Collaborator

CI OK now beside the packaging problen, so merging

@kelson42 kelson42 force-pushed the backslash_handling_in_suggestions branch from 06c3eb7 to d66cc62 Compare November 17, 2022 10:43
@kelson42 kelson42 merged commit 3568ccd into master Nov 17, 2022
@kelson42 kelson42 deleted the backslash_handling_in_suggestions branch November 17, 2022 10:48
mgautierfr added a commit that referenced this pull request Nov 30, 2022
* [API Break] Remove wrapper around libzim (@mgautierfr #789)
* Allow kiwix-serve to use custom resource files (@veloman-yunkan #779)
* Properly handle searchProtocolPrefix when rendering search result (@veloman-yunkan #823)
* Prevent search on multi language content (@veloman-yunkan #838)
* Use new `zim::Archive::getMediaCount` from libzim (@mgautierfr #836)
* Catalog:
 - Include tags in free text catalog search (@veloman-yunkan #802)
 - Illustration's url is based on book's uuid (@veloman-yunkan #804)
 - Cleanup of the opds-dumper (@veloman-yunkan #829)
 - Allow filtering of catalog content using multiple languages (@veloman-yunkan #841)
 - Make opds-dumper respect the namemapper (@mgautierfr #837)
* Server:
 - Correctly handle `\` in suggestion json generation (@veloman-yunkan #843)
 - Better http caching (@veloman-yunkan #833)
 - Make `/suggest` endpoint thread-safe (@veloman-yunkan #834)
 - Better redirection of main page (@veloman-yunkan #827)
 - Remove jquery (@mgautierfr @juuz0 #796)
 - Better Viewer of zim content :
   . Introduce `/content` endpoints (@veloman-yunkan #806)
   . Switch to iframe based content viewer (@veloman-yunkan #716)
 - Optimised design of the welcome page:
   . Alignement (@juuz0 @kelson42 #786)
   . Exit download modal on pressing escape key (@Juzz0 #800)
   . Add favicon for different devices (@Juzz0 #805)
   . Fix auto hidding of the toolbar (@veloman-yunkan #821)
   . Allow user to filter books by tags in the front page (@juuz0 #711)
* CI :
  - Trigger CI on pull_request (@kelson42 #791)
  - Drop Ubuntu Impish packaging (@legoktm #825)
  - Add Ubuntu Kinetic packaging (@legoktm #801)
* Testing:
  - Test ICULanguageInfo (@veloman-yunkan #795)
  - Introduce fake `test` language to test i18n (@veloman-yunkan #848)
* Fix documentation (@kelson42 #816)
* Udpate translation (#787 #839 #847)
@mgautierfr mgautierfr mentioned this pull request Nov 30, 2022
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.

Backslash symbol in suggestions results in broken JSON
3 participants