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.
pull/8141/head
John Beard 3 years ago committed by GitHub
parent c171a06212
commit dac3940ced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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>")

Loading…
Cancel
Save