RSS/Atom output and HTML tag support

From semantic-mediawiki.org

It's probably useful that the display of page content is made optional through page=none/full, but this change introduced a major regression I'm afraid. Page content is no longer rendered and what you get instead is a lot of HTML code. Example: RSS feed example (Now the same goes for format=rss)

Maybe we should leave out this option from the documentation until this bug has been fixed?

11:34, 3 February 2013

There is no regression.

This is as it supposed to be because that is what a normal feed program will understand and display. If you are unsure about the HTML tag support in RSS/Atom, please read [1] /[2] also if you look at [3] you can see that the SMW RSS/Atom feed has the same form and output as all other Mediawiki RSS/Atom outputs.

[1] https://tools.ietf.org/html/rfc4287#section-1.1

[2] http://cyber.law.harvard.edu/rss/encodingDescriptions.html

[3] http://www.mediawiki.org/w/index.php?title=Special:RecentChanges&feed=rss

12:08, 3 February 2013

Also if you look in how the ask query is designed on the main page (your cited example) you could see the difference in why the output for RSS and Atom is different because the query is different.

{{#ask:[[News date::+]] [[language code::en]]
| sort=news date
| order=desc
| format=feed
| searchlabel=RSS
| title=Semantic MediaWiki – news
| description=Latest news from semantic-mediawiki.org
}} · {{#ask:[[News date::+]] [[language code::en]]
| sort=news date
| order=desc
| format=feed
| type=atom
| page=full
| searchlabel=Atom
| title=Semantic MediaWiki – news
| description=Latest news from semantic-mediawiki.org
}}
12:23, 3 February 2013

Actually, I used to use Google Reader for this (not the web browser directly), but apparently, Google does not support raw RSS outputs, at least not by default - it's quite possible that I've overlooked a setting or Google Reader is simply not the right tool for the job.

17:37, 4 February 2013

The same link now gives a perfectly readable page. It must be something in my browser settings (like a news reader I'm not aware of) or Google Reader, I guess.

12:39, 1 March 2013

Hi, I encountered the same encoding problem.

On the Feed on SMW site < is displayed correctly meanwhile calling the

Feed on my site the < is changed to &lt; and is thus not rendered by the browser / feed reader.

Source Page my site

Source Page SMW

I already changed language settings / SMW versions. Any help?? Kaboomki (talk)

16:27, 9 August 2013

I'm guessing you are using SMW 1.8.0.5 while smw.org already uses SMW 1.9. Either you wait until 1.9 is officially released or you use the git master to get access to the updated FeedResultPrinter class.

22:15, 9 August 2013

Thanks! I updated to SMW 1.9. See https://docupedia.de/zg/Spezial:Version

However the issue with parameter page=full is still there.

my feed

Source Page

Is it necessary to update MW too? Best (talk)

15:00, 12 August 2013

When looking at Spezial:Version it shows SMW 1.9 but somehow I got the feeling it is an older version of SMW 1.9.

The ensure you use the current master you should use git clone https://git.wikimedia.org/git/mediawiki/extensions/SemanticMediaWiki.git

You can verify that you have the latest by looking at includes/queryprinters/FeedResultPrinter.php line 281 which should only contain

return FeedItem::stripComment( implode( ',', $items ) ) .
	FeedItem::stripComment( $pageContent );

If you can confirm that this the SMW version you are using then MW might be the next path to look into.

02:44, 13 August 2013
 

I just added a test case [1] that verifies that a text like "A&O Berlin" will output "A&O Berlin" for the current SMW 1.9 master.

[1] https://gerrit.wikimedia.org/r/#/c/78931/1/tests/phpunit/includes/queryprinters/FeedResultPrinterTest.php

03:37, 13 August 2013
 

Aside from the SMW version and not related to the above issue it seems you are using 1.19.2 where its commendable to at least use MW 1.19.7 as unit tests deployed with SMW 1.9 (current master) are tested against MW 1.19.7, 1.21, and 1.22.

03:54, 13 August 2013

Your were right. I selected a wrong branch. Now I upgraded my testserver to SMW 1.9 and the RSS printer fullpage option worked well. I will wait until 1.9 is released officially before I update the live system (linked above). Thank You!

12:47, 13 August 2013