journalduhacker/app/views/comments/index.rss

25 lines
831 B
XML

<?xml version="1.0" encoding="UTF-8" ?>
<% coder = HTMLEntities.new %>
<rss version="2.0">
<channel>
<title><%= Rails.application.name %><%= @title.present? ?
": " + h(@title) : "" %></title>
<description><%= @title %></description>
<link><%= root_url %>comments</link>
<% @comments.each do |comment| %>
<item>
<title>on <%= raw coder.encode(comment.story.title, :decimal) %></title>
<link><%= comment.url %></link>
<guid><%= comment.short_id_url %></guid>
<author><%= comment.user.username %></author>
<pubDate><%= comment.created_at.rfc2822 %></pubDate>
<comments><%= comment.url %></comments>
<description><%= raw coder.encode(comment.markeddown_comment,
:decimal) %></description>
</item>
<% end %>
</channel>
</rss>