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

Kiwix-serve does not (always) print title properly #223

Closed
kelson42 opened this issue Aug 30, 2018 · 7 comments
Closed

Kiwix-serve does not (always) print title properly #223

kelson42 opened this issue Aug 30, 2018 · 7 comments

Comments

@kelson42
Copy link
Contributor

With https://download.kiwix.org/zim/stack_exchange/stackoverflow.com_eng_all_2018-08.zim, the title in the search bar print escaped %26 characters.

@Bhavnaharitsa
Copy link

I want to work on this issue

@kelson42
Copy link
Contributor Author

kelson42 commented Oct 3, 2018

@Bhavnaharitsa OK, you probably need here to secure the HTML proper encoding before printing.

@Bhavnaharitsa
Copy link

Where can I find the file for the html page ?

@mgautierfr
Copy link
Member

The content of the taskbar (I suppose it is what @kelson42 call search bar) is generated depending of the actual page displayed.

The template is here : https://github.com/kiwix/kiwix-tools/blob/master/static/server/taskbar.html.part
The template is used in the introduceTaskbar function here : https://github.com/kiwix/kiwix-tools/blob/master/src/server/kiwix-serve.cpp#L161

However, @kelson42 may speak about the titles displayed in the search suggestions (when you start to type a search term). If this is the case, you will have to look elsewhere :

This is also related to #205. You may want to also fix it while your working of the title displaying. (But please try to separate your submissions with separated PRs or, at least, separated commits)

@rgaudin
Copy link
Member

rgaudin commented Aug 7, 2019

Also affected by this. @kelson42's link not much useful and hardly visible on online library. Use inspector to reveal.

Character & is escaped to %26.

It seems to be a known issue given this line but it didn't fix it. At least with 2.1.0.

  content = replaceRegex(content, replaceRegex(zimTitle, "%26", "&"), "__ZIM_TITLE__");

@kelson42
Copy link
Contributor Author

kelson42 commented Aug 7, 2019

@rgaudin Yes, its an old problem which already have been tried to be fixed... I think this is in fact a bit more complex than what it looks like... but I don't remember why.

@ghost
Copy link

ghost commented Aug 20, 2021

This issue was moved by kelson42 to openzim/sotoki#235.

@ghost ghost closed this as completed Aug 20, 2021
@kelson42 kelson42 removed this from To do in Better library Aug 20, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants