bubelov / news

Feed Reader and Podcast Player for Android
https://f-droid.org/packages/co.appreactor.news/
GNU General Public License v3.0
405 stars 24 forks source link

OPML Import Failure: Processing instructions must not start with xml #176

Closed glacambre closed 1 year ago

glacambre commented 1 year ago

Checklist

Steps to reproduce the bug

Import the following OPML file:

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
  <head>
    <title>
      Feeder
    </title>
  </head>
  <body>
    <outline title="Loper OS" text="Loper OS" type="rss" xmlUrl="http://www.loper-os.org/?feed=rss2"/>
  </body>
</opml>

Actual behavior

News fails with the following error message: -- Processing instructions must not start with xml (position:unknown @3:1 in java.io.InputStreamReader@3b727a2).

Expected behavior

The feed is correctly imported. As far as I can see, line 3 looks like this:

<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
...

Having <?xml...?> be directly followed by a tag (rather than a newline character) seems unorthodox to me, although I'm not certain this is illegal. Could that be the source of the problem?

Device info

bubelov commented 1 year ago

Does not validate: https://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.loper-os.org%2F%3Ffeed%3Drss2