Known Deviations from Universal Feed Parser - simplepie/simplepie-ng GitHub Wiki

Universal Feed Parser was, for many years, the gold standard for feed parsers across all languages. Originally developed by Mark Pilgrim (before his infosuicide), Universal Feed Parser was stunning in that it claimed to have over 3000 assertions!

These tests have been integrated into the SimplePie NG test suite, and in many cases, we have followed Universal Feed Parser’s lead by passing the majority of its tests. But there are a few cases where I believe that Mark Pilgrim was wrong, or Universal Feed Parser’s functionality is not something that I have chosen not to match.

“Q&A”

In the Universal Feed Parser test suite, there is a test called qna.xml which asserts that HTML content of Q&A should remain Q&A. This, however, is inconsistent with all of the other tests which assert that Q&A in an HTML context becomes Q&A.

Our tests reflect that Q&A in an HTML or XHTML context becomes Q&A.

Underscores in locales

In the Universal Feed Parser test suite, there are two tests called feed_xml_lang_underscore.xml and entry_content_xml_lang_underscore.xml which assert that if compound locale names (BCP 47) are joined with an underscore (e.g., en_US, fr_CA), that character should be converted to a hyphen (e.g., en-US, fr-CA).

Due to the differences in implementation between XML elements and XML attributes in SimplePie NG, the overhead of such a change is just enough that inadvertent bugs could be caused by attempting to make these adjustments. As such, we do not reformat the locale identifiers.