Whoops - keep my own changes out of this commit.

Dustin Miller 10 年 前
コミット
d8f672a870
共有1 個のファイルを変更した3 個の追加1 個の削除を含む
  1. 3 1
      app/models/agents/data_output_agent.rb

+ 3 - 1
app/models/agents/data_output_agent.rb

@@ -108,6 +108,7 @@ module Agents
108 108
           return [content, 200]
109 109
         else
110 110
           content = Utils.unindent(<<-XML)
111
+            <?xml version="1.0" encoding="UTF-8" ?>
111 112
             <rss version="2.0">
112 113
             <channel>
113 114
              <title>#{feed_title.encode(:xml => :text)}</title>
@@ -116,9 +117,10 @@ module Agents
116 117
              <lastBuildDate>#{Time.now.rfc2822.to_s.encode(:xml => :text)}</lastBuildDate>
117 118
              <pubDate>#{Time.now.rfc2822.to_s.encode(:xml => :text)}</pubDate>
118 119
              <ttl>#{feed_ttl}</ttl>
120
+
119 121
           XML
120 122
 
121
-          content += items.to_xml(:skip_instruct => true, :skip_types => true, :root => "items", :indent => 1).gsub(/^<\/?items>/, '').strip
123
+          content += items.to_xml(:skip_types => true, :root => "items", :skip_instruct => true, :indent => 1).gsub(/^<\/?items>/, '').strip
122 124
 
123 125
           content += Utils.unindent(<<-XML)
124 126
             </channel>