UrlEncode the content_id.

The HumanReadableId can contains special char (`&`/`=`/...)
As it is used as to create a url in the opds template,
we must url encode it.

- We don't need to encode the book id as it is a uuid, it never contains
special char.
- We don't need to encode the book url as it is read from the library and
the url must already be correctly encoded in the library.xml.
(tests modified accordingly)
This commit is contained in:
Matthieu Gautier
2021-12-01 10:33:52 +01:00
parent d4db090bb9
commit 3052d0787a
5 changed files with 7 additions and 5 deletions

View File

@ -29,6 +29,7 @@ if gtest_dep.found() and not meson.is_cross_build()
data_files = [
'example.zim',
'zimfile.zim',
'zimfile&other.zim',
'corner_cases.zim',
'library.xml'
]