Browse Source

remove a few parser warnings from generated feeds

Andrew Dolgov 5 years ago
parent
commit
0ee126ee8f
2 changed files with 4 additions and 2 deletions
  1. 1 1
      classes/handler/public.php
  2. 3 1
      templates/generated_feed.txt

+ 1 - 1
classes/handler/public.php

@@ -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);
 

+ 3 - 1
templates/generated_feed.txt

@@ -15,13 +15,15 @@
 <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}"/>