From af6a740884311e7e3d4deff54f8d733e28fa4b9f Mon Sep 17 00:00:00 2001 From: Max Magorsch Date: Mon, 9 Mar 2020 16:01:39 +0100 Subject: Fix the atom feeds so that they are valid Signed-off-by: Max Magorsch --- atom.universe.xml.erb | 23 +++++++++++------------ atom.xml.erb | 19 +++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/atom.universe.xml.erb b/atom.universe.xml.erb index a73045c..a94ad98 100644 --- a/atom.universe.xml.erb +++ b/atom.universe.xml.erb @@ -1,13 +1,13 @@ -<% require 'loofah' %> +<% require 'loofah' %><% require 'cgi' %> Planet Gentoo -<%= site.items.latest.limit(50).first.published.strftime('%FT%T%:z ') %> +<%= site.items.latest.limit(50).first.published.strftime('%FT%T%:z') %> Pluto Welcome to <b>Planet Gentoo</b>, an aggregation of Gentoo-related weblog articles written by Gentoo developers. For a broader range of topics, you might be interested in <a href="https://planet.gentoo.org/universe/">Gentoo Universe</a>. planet@gentoo.org - https://planet.gentoo.org/atom.xml + https://planet.gentoo.org/universe/atom.xml @@ -18,19 +18,17 @@ <%= CGI::escapeHTML(item.url) %> - <%= CGI::escapeHTML(item.title) %> - -
+ <%= CGI::escapeHTML(item.title) %> + <% if item.summary %> <%= CGI::escapeHTML(Loofah.fragment(item.summary).scrub!(:prune).to_s) %> <% else %> -/- <% end %> -
- -
+ + <% if item.content %> <%= CGI::escapeHTML(Loofah.fragment(item.content).scrub!(:prune).to_s) %> <% elsif item.summary %> @@ -38,11 +36,11 @@ <% else %> -/- <% end %> -
+
- <%= CGI::escapeHTML(item.feed.title) %> + <%= CGI::escapeHTML(item.feed.title) %> <%= CGI::escapeHTML(item.feed.url) %> @@ -50,8 +48,9 @@ <%= CGI::escapeHTML(item.title) %> - <%= item.published.strftime('%FT%T%:z ') %> + <%= item.published.strftime('%FT%T%:z') %> + <%= item.published.strftime('%FT%T%:z') %>
<% end %> diff --git a/atom.xml.erb b/atom.xml.erb index 0d10ebf..03b8288 100644 --- a/atom.xml.erb +++ b/atom.xml.erb @@ -1,7 +1,7 @@ <% require 'loofah' %><% require 'cgi' %> Planet Gentoo -<%= site.items.latest.limit(50).first.published.strftime('%FT%T%:z ') %> +<%= site.items.latest.limit(50).first.published.strftime('%FT%T%:z') %> Pluto Welcome to <b>Planet Gentoo</b>, an aggregation of Gentoo-related weblog articles written by Gentoo developers. For a broader range of topics, you might be interested in <a href="https://planet.gentoo.org/universe/">Gentoo Universe</a>. @@ -19,19 +19,17 @@ <%= CGI::escapeHTML(item.url) %> - <%= CGI::escapeHTML(item.title) %> - -
+ <%= CGI::escapeHTML(item.title) %> + <% if item.summary %> <%= CGI::escapeHTML(Loofah.fragment(item.summary).scrub!(:prune).to_s) %> <% else %> -/- <% end %> -
- -
+ + <% if item.content %> <%= CGI::escapeHTML(Loofah.fragment(item.content).scrub!(:prune).to_s) %> <% elsif item.summary %> @@ -39,11 +37,11 @@ <% else %> -/- <% end %> -
+
- <%= CGI::escapeHTML(item.feed.title) %> + <%= CGI::escapeHTML(item.feed.title) %> <%= CGI::escapeHTML(item.feed.url) %> @@ -51,8 +49,9 @@ <%= CGI::escapeHTML(item.title) %> - <%= item.published.strftime('%FT%T%:z ') %> + <%= item.published.strftime('%FT%T%:z') %> + <%= item.published.strftime('%FT%T%:z') %>
<% end %> -- cgit v1.2.3-65-gdbad