We are using search_api views and generate rss feeds from them. In the atom-link and sourceurl fields the URL of the current page is inserted. This URL may have an ampersand in it that is not properly escaped.

<atom:link rel="self" href="http://localhost/devtrac78/sitevisits/analyse/feed?f[0]=taxonomy_vocabulary_6%3A242&f[1]=taxonomy_vocabulary_6%3A244&display=tagcloud" />

This invalidates the RSS, according to W3C (and all RSS clients i tried)

Validation Output: 24 Errors

Warning Line 6, Column 113: cannot generate system identifier for general entity "f"


An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and æ are different characters.


maciej.zgadzaj’s picture

Status:Active» Fixed

This should work fine in the most recent dev version, where feed generation has been updated to use format_xml_elements() function (see Views RSS: feed generation updated! entry for more info).

batje’s picture

And indeed that works. Awesome!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.