OPDS: Also handle self-closing dc: tags (#7900)

Fix #7899
pull/7903/head
NiLuJe 3 years ago committed by GitHub
parent 96c895d561
commit dde732c17f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -75,7 +75,7 @@ function OPDSParser:parse(text)
-- luxl doesn't handle XML comments, so strip them
text = text:gsub("<!%-%-.-%-%->", "")
-- luxl is also particular about the syntax for self-closing, empty & orphaned tags...
text = text:gsub("<(%l+)/>", "<%1 />")
text = text:gsub("<([%l:]+)/>", "<%1 />")
-- We also need to handle the slash-less variants for br & hr...
text = text:gsub("<([bh]r)>", "<%1 />")
-- Some OPDS catalogs wrap text in a CDATA section, remove it as it causes parsing problems

Loading…
Cancel
Save