kiwix / kiwix-tools

Command line Kiwix tools: kiwix-serve, kiwix-manage, ...
https://download.kiwix.org/release/kiwix-tools/
GNU General Public License v3.0
434 stars 85 forks source link

Kiwix-serve faulty response to search with '&' in title #469

Closed eroyee closed 3 years ago

eroyee commented 3 years ago

Kiwix-serve version 3.1.2, RPi 3, Rasbpian 9.13.

When searching for an entry in Wikipedia (en) that includes an '&' in the title the return is malformed, meaning it's not possible to follow the response to the correct page.

Important - in the examples below I've had to put a space between '&' and 'amp' etc because Github renders the display sans 'amp', 'apos' etc. In actuality the response from kiwix-serve has no space.

Example:

  1. Search for 'Thelma & Louise'
  2. Returns a list of responses including 'Thelma & Louise'
  3. Clicking on 'Thelma & Louise' gives 'Thelma & amp; Louise'
  4. Following that link will not go to the correct page - eventually, after some in what appears to be a further search, it will give a list of several pages that do NOT include 'Thelma & Louise'.

This appears replicable across anything that contains '&' (another example is 'Wallace & Gromit' :-), possibly some HTML encoding issue?

Update: A search just for '&' (including apostrophes) returns '& apos;& amp;& apos;' in all libraries I've tried.

Note the issue is not just with the Wikipedia library - a search for 'P&ID' in Engineering.Stackexchange returns 'P& amp;ID Symbol Identification Question' etc.

maneeshpm commented 3 years ago

Hey @eroyee 😄 This looks similar to #453 which has been fixed and should be available in the next release.

eroyee commented 3 years ago

@maneeshpm Thanks, I see that now!

I believe this should be a later build of kiwix-serve (june '21) post https://github.com/kiwix/kiwix-tools/issues/453, however I'll see if there's anything later and will try that before closing this ticket.

BTW I note that, unfortunately kiwix-serve -V doesn't give a build number/date - any idea if there's a hidden command to display that?

maneeshpm commented 3 years ago

I believe @kelson42 is a better person to comment on the tentative release date and the kiwix-serve -v feature

eroyee commented 3 years ago

@maneeshpm Ok, it's fine with build of 13 Jul :+1:

Certainly quite a different look with this version (and much bigger file!).

Thanks + apologies for the dupe!