diff --git a/frontend/ui/opdsparser.lua b/frontend/ui/opdsparser.lua index cff8f64f1..893a523d2 100644 --- a/frontend/ui/opdsparser.lua +++ b/frontend/ui/opdsparser.lua @@ -80,7 +80,9 @@ function OPDSParser:parse(text) text = text:gsub("
", "
") text = text:gsub("
", "
") -- some OPDS catalogs wrap text in a CDATA section, remove it as it causes parsing problems - text = text:gsub("","%1") + text = text:gsub("", function (s) + return s:gsub( "%p", {["&"] = "&", ["<"] = "<", [">"] = ">" } ) + end ) local xlex = luxl.new(text, #text) return self:createFlatXTable(xlex) end diff --git a/frontend/ui/widget/opdsbrowser.lua b/frontend/ui/widget/opdsbrowser.lua index 72bb30f27..dfd7f8f9b 100644 --- a/frontend/ui/widget/opdsbrowser.lua +++ b/frontend/ui/widget/opdsbrowser.lua @@ -269,7 +269,7 @@ function OPDSBrowser:fetchFeed(item_url, username, password) request['url'] = item_url request['method'] = 'GET' request['sink'] = ltn12.sink.table(sink) - request['headers'] = { Authorization = "Basic " .. mime.b64(auth), ["Host"] = hostname, }, + request['headers'] = { Authorization = "Basic " .. mime.b64(auth), ["Host"] = hostname, } logger.info("request", request) http.TIMEOUT, https.TIMEOUT = 10, 10 local httpRequest = parsed.scheme == 'http' and http.request or https.request