Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSS feeds with invalid mimetype #35

Closed
Roromis opened this issue Feb 2, 2013 · 1 comment
Closed

RSS feeds with invalid mimetype #35

Roromis opened this issue Feb 2, 2013 · 1 comment
Labels

Comments

@Roromis
Copy link

Roromis commented Feb 2, 2013

Hi,

Selfoss (1.3 and 2.0b) doesn't work well with RSS feeds which have invalid mimetype (e.g. text/plain instead of application/rss+xml).

It can be easily fixed by replacing:

        $this->feed = @new \SimplePie();
        @$this->feed->set_cache_location(\F3::get('cache'));
        @$this->feed->set_cache_duration(1800);
        @$this->feed->set_feed_url(htmlspecialchars_decode($params['url']));

        // fetch items
        @$this->feed->init();

with

        $this->feed = @new \SimplePie();
        @$this->feed->set_cache_location(\F3::get('cache'));
        @$this->feed->set_cache_duration(1800);
        @$this->feed->set_feed_url(htmlspecialchars_decode($params['url']));

        @$this->feed->force_feed(true);

        // fetch items
        @$this->feed->init();

near line 150 in spouts/rss/feed.php (see http://simplepie.org/wiki/reference/simplepie/force_feed).

@SSilence
Copy link
Member

SSilence commented Feb 2, 2013

Thanks for this issue. I have added the force_feed. I think this make sense. I'm sure there are some feeds with wrong mime type in the web available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants