URI-encoding of redirections to URLs with special symbols

This commit is contained in:
Veloman Yunkan
2023-01-07 15:45:33 +04:00
parent 78b2c1a273
commit 8eb527389e
2 changed files with 4 additions and 4 deletions

View File

@ -1030,7 +1030,7 @@ ParameterizedMessage suggestSearchMsg(const std::string& searchURL, const std::s
std::unique_ptr<Response>
InternalServer::build_redirect(const std::string& bookName, const zim::Item& item) const
{
const auto path = kiwix::urlEncode(item.getPath());
const auto path = kiwix::urlEncode(item.getPath(), true);
const auto redirectUrl = m_root + "/content/" + bookName + "/" + path;
return Response::build_redirect(*this, redirectUrl);
}