Comments (3)
At first sight, I would said that we should not url encode / in the path.
Building suggestion links using URI-encoded components (book name and the article path) was introduced in #860. The main targets were only a few dangerous symbols, however in the absence of a standard function for selective URI-encoding all reserved symbols were encoded leading to this issue.
wonder a bit that we still have URL encoding issues.
@kelson42 The non-homogeneous structure of URLs but the natural desire to keep things simple has resulted in an encoding scheme that makes the world go nuts when one URL has to be embedded in another URL. Therefore there is no surprise that a human mind cannot comprehend all possible interactions of various scenarios (especially when pieces of code from different people having different assumptions meet in one place). Hence, please be prepared for a few more issues of this kind with exponentially growing weirdness until fixing the last one will produce a space-time singularity that will destroy our Universe. π
from libkiwix.
My question at this point would be: why are we URL-encoding this information? From what I understand, this is a ZIM-Entry path that is sent to us via the Suggestion API and we just use it as source of the iframe (prefixed with root if any).
Need for URL-encoding would be to prevent characters from that ZIM entry path to be interpreted as special-meaning for being reserved characters.
We url encode as we may have ?
or #
being part of the entry path. If we don't url encode the path, the path foo/bar?option=true#section1
would lead to a request for foo/bar
, with query string option=true
and without section has every thing after the #
is not send to the server.
While ZIM path are entirely free, ZIM creators already limit themselves and will do as long as ZIM are mainly run in a Web context.
At least zimit stores the querystring as part of the path (foo/bar?option=true
).
At first sight, I would said that we should not url encode /
in the path.
from libkiwix.
@veloman-yunkan This is a must fix before releasing 12.1.0
... wonder a bit that we still have URL encoding issues.
from libkiwix.
Related Issues (20)
- Release 13.1.0
- kiwix::Downloader may miss a quickly finished download HOT 4
- Impossible to drop entries from the kiwix::Downloader's cache HOT 2
- Make library work with more browsers by polyfilling `replaceAll()`
- NMU diff for 64-bit time_t transition HOT 2
- Access books using a metadata-based ID HOT 3
- Should external catcher relax on scheme change? HOT 3
- Tests not running anymore on my Ubuntu 22.04 HOT 1
- sync releases with library users HOT 5
- Add IPV6 support HOT 2
- To import bookmarks in android we require the `library.xml` HOT 10
- Suggestions for improving Kiwix-server for blind people HOT 5
- βBlkβ language is not displayed properly in Kiwix Serve language filter HOT 7
- library.kiwix.org appears to have stopped updating HOT 1
- Release 14.0.0
- Edge case: kiwix-serve style & script injection fails if optional </head> tag is not present HOT 2
- Add download button in the preview of ZIMs in library.kiwix.org HOT 3
- Kiwix Server viewer βhomeβ button is most of he time not big enough HOT 1
- Remove `KIWIX_DATA_DIR` HOT 3
- `kiwix::getDataDirectory()` should be moved to `kiwix/kiwix-desktop` repository HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libkiwix.