Fix http url path and component's coding (#3237 #3181)

This commit is contained in:
sandro-qiang
2024-01-28 19:18:36 +08:00
committed by GitHub
parent cfe9a31ca6
commit ceae040a7a
8 changed files with 130 additions and 10 deletions

View File

@@ -228,7 +228,7 @@ static bool makeFolderMenu(const string &httpPath, const string &strFullPath, st
multimap<string/*url name*/, std::pair<string/*note name*/, string/*file path*/> > file_map;
File::scanDir(strPathPrefix, [&](const std::string &path, bool isDir) {
auto name = fileName(strPathPrefix, path);
file_map.emplace(strCoding::UrlEncode(name), std::make_pair(name, path));
file_map.emplace(strCoding::UrlEncodePath(name), std::make_pair(name, path));
return true;
});
//如果是root目录添加虚拟目录