mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-22 11:22:38 -04:00
urlencoding() in the search result page is now only made on the "title" part of the url
This commit is contained in:
parent
d24c98fcfe
commit
be74d59d18
@ -218,7 +218,7 @@ static int accessHandlerCallback(void *cls,
|
|||||||
content = "<html><head><title>Kiwix search results</title></head><body><h1>Results</h1><hr/><ol>\n";
|
content = "<html><head><title>Kiwix search results</title></head><body><h1>Results</h1><hr/><ol>\n";
|
||||||
while (searcher->getNextResult(urlStr, titleStr, scoreInt)) {
|
while (searcher->getNextResult(urlStr, titleStr, scoreInt)) {
|
||||||
sprintf(scoreStr, "%d", scoreInt);
|
sprintf(scoreStr, "%d", scoreInt);
|
||||||
content += "<li><a href=\"" + urlEncode(urlStr) + "\">" + titleStr+ "</a> - " + scoreStr + "%</li>\n";
|
content += "<li><a href=\"" + urlStr.substr(0, 2) + urlEncode(urlStr.substr(2)) + "\">" + titleStr+ "</a> - " + scoreStr + "%</li>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user