[Pmwiki-users] RSS feed - HTML markup

Patrick R. Michaud pmichaud
Thu Jun 3 07:51:47 CDT 2004


On Wed, Jun 02, 2004 at 11:59:14PM -0400, Constantin Basturea wrote:
> I maintain a directory of resources, with a lot of links and frequent updates.
> 
> Since many people are reading the wiki page in their RSS newsreaders,
> a full-text RSS feed of the page(s), with functional links, would be
> very helpful. The current output includes just the text of the page,
> stripped off of any HTML markup, so there are no links and no
> structure for the page (titles, paragraphs, bullets, etc.)

PmWiki does this because, at least as of last August, including HTML in 
the <description> element of an RSS feed is discouraged, if not forbidden.  
It certainly causes the RSS output to no longer parse as a valid XML document.

I'm pretty sure that the example output from Socialtext is an invalid
RSS document.  At the very least the HTML should be enclosed in a 
<![CDATA [...]]> section; from my brief reading on the topic it looks
as though this really belongs in a <content:encoded> element.

> I know there's at least a wiki that transforms wiki formatting into
> HTML markup in the RSS feed, and I was wondering if it would be
> possible to have this feature in PmWiki.

I haven't looked at the RSS specs in many months, so it may have
progressed since I wrote the rss.php script.  If someone can find me
some definitive information/guides about including HTML in RSS output,
I'll be very happy to support it in the code.

In the meantime, if you don't mind violating the RSS spec, you should be
able to patch the rss.php module so that it doesn't strip the HTML tags--
either (1) comment out the line that reads:

    $text = rssencode(preg_replace("/<.*?>/s","",$text)); 

or (2) change it to be

    $text = rssencode($text);

Pm




More information about the pmwiki-users mailing list