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 encoding/decoding HTML entities in search suggestions #458

Merged
merged 2 commits into from
Mar 4, 2021

Conversation

veloman-yunkan
Copy link
Collaborator

Fixes #398

@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #458 (c7d7739) into master (89d7e68) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #458   +/-   ##
=======================================
  Coverage   59.48%   59.48%           
=======================================
  Files          50       50           
  Lines        3409     3409           
  Branches     1724     1724           
=======================================
  Hits         2028     2028           
  Misses       1378     1378           
  Partials        3        3           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89d7e68...c7d7739. Read the comment docs.

Since the `value` field of the search suggestion results is HTML
escaped/encoded in the backend (see static/templates/suggestion.json) it
must be decoded in the frontend.
Without this if the suggestion text contains a double quote, the
response stops being a valid json.
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.

HTML entities are not removed from ZIM article titles
3 participants