MattByName / Pico-RssMaker

Very basic RSS plugin for Pico. Generates RSS feed of all pages with a date. Based on old pico_rss plugin and PicoXMLSitemap plugin.
MIT License
7 stars 5 forks source link

Browsers don't RSS as a real XML file #2

Closed anasram closed 4 years ago

anasram commented 4 years ago

Hi Matt,

It seems like browsers can't recognize the resulted XML file as a real XML file.

When I tried to link it to a CSS file, nothing changed. It still read it as a plain text.

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="themes/richstyle/css/richstyle.css"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

Here's a live demo.

cc: @PhrozenByte; @theshka.

Thanks in advance.

anasram commented 4 years ago

Found it:

header("Content-Type: application/xml; charset=UTF-8");

instead of:

header("Content-Type: application/rss+xml; charset=UTF-8");

But which is better for RSS: application/xml or application/rss+xml?

I don't now! Anyway, this is another issue.