mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
WebDAV: Unescape XML entities when reading the item list (#8138)
Without this, a file named "A & B.epub" is read as "A & B.pdf" and will 404 when fetched.
This commit is contained in:
@@ -115,7 +115,10 @@ function WebDavApi:listFolder(address, user, pass, folder_path)
|
||||
item_fullpath = string.sub( item_fullpath, 1, -2 )
|
||||
end
|
||||
local is_current_dir = self:isCurrentDirectory( item_fullpath, address, path )
|
||||
|
||||
local item_name = util.urlDecode( FFIUtil.basename( item_fullpath ) )
|
||||
item_name = util.htmlEntitiesToUtf8(item_name)
|
||||
|
||||
local is_not_collection = item:find("<[^:]*:resourcetype/>") or
|
||||
item:find("<[^:]*:resourcetype></[^:]*:resourcetype>")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user