]> git.wh0rd.org - tt-rss.git/commitdiff
remove a few parser warnings from generated feeds
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 6 Oct 2013 07:28:06 +0000 (11:28 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sun, 6 Oct 2013 07:28:06 +0000 (11:28 +0400)
classes/handler/public.php
templates/generated_feed.txt

index c5a2a03cb3bb620c7eaca83b5d91cf11c83f25f1..a656ed63b3c51f806c0526d4c81cd54b5b3d3914 100644 (file)
@@ -123,7 +123,7 @@ class Handler_Public extends Handler {
                                $tpl->setVariable('ARTICLE_AUTHOR', htmlspecialchars($line['author']), true);
 
                                $tpl->setVariable('ARTICLE_SOURCE_LINK', htmlspecialchars($line['site_url']), true);
-                               $tpl->setVariable('ARTICLE_SOURCE_TITLE', htmlspecialchars($line['feed_title']), true);
+                               $tpl->setVariable('ARTICLE_SOURCE_TITLE', htmlspecialchars($line['feed_title'] ? $line['feed_title'] : $feed_title), true);
 
                                $tags = get_article_tags($line["id"], $owner_uid);
 
index c1f921c45ad78117ef40c8b5b8e1d517e006e2a0..5e35f9be1b93acf3a6317d6b60f5f1d1881366f8 100644 (file)
 <entry>
        <id>${ARTICLE_ID}</id>
        <link href="${ARTICLE_LINK}" rel="alternate" type="text/html"/>
-       <title>${ARTICLE_TITLE}</title>
+       <title type="html">${ARTICLE_TITLE}</title>
        <summary type="html"><![CDATA[${ARTICLE_EXCERPT}]]></summary>
        <content type="html"><![CDATA[${ARTICLE_CONTENT}]]></content>
        <updated>${ARTICLE_UPDATED_ATOM}</updated>
        <author><name>${ARTICLE_AUTHOR}</name></author>
        <source>
+               <id>${ARTICLE_SOURCE_LINK}</id>
                <link rel="self" href="${ARTICLE_SOURCE_LINK}"/>
+               <updated>${ARTICLE_UPDATED_ATOM}</updated>
                <title>${ARTICLE_SOURCE_TITLE}</title></source>
 <!-- $BeginBlock category -->
        <category term="${ARTICLE_CATEGORY}"/>