You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ curl "http://127.0.0.1:8080/suggest?content=wikipedia_en_all_nopic_2022-01&term=pi" | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1317 100 1317 0 0 24687 0 --:--:-- --:--:-- --:--:-- 24849
parse error: Invalid escape at line 27, column 19
@veloman-yunkan Would you be able to quickly fit that (and adapt the test)? In general I wonder that we have this kind of bug, we don't use an external primitive to do the json escaping?!
The text was updated successfully, but these errors were encountered:
@veloman-yunkan Discussing with @mgautierfr about the problem, it came back that a few months ago, there was the discussion about using a proper external json library. I wonder if this would be the right time to reassess this idea.
@kelson42 The fix itself is simple enough to not justify utilizing a special library (as long as only libkiwix is concerned). The only other place in the Kiwix/OpenZIM ecosystem (that I am aware of) where we have to deal with JSON generation is in zimcheck. If we want to address that one too, then it makes a little more sense.
@veloman-yunkan Yes, I'm supportive to address both. I'm just unsure about the timing. Probably we could go for your fix for now, but at next opportunity we should really put the topic on the topic on the table.
Originally posted by @kelson42 in #769 (comment)
I had a look to the problem with "pi" and the problem is related to wrong json escaping, see this:
and here with json integrety check:
@veloman-yunkan Would you be able to quickly fit that (and adapt the test)? In general I wonder that we have this kind of bug, we don't use an external primitive to do the json escaping?!
The text was updated successfully, but these errors were encountered: