From af312b946a8149648ba8fbf260bd61f2683fb629 Mon Sep 17 00:00:00 2001 From: danilo silva Date: Sun, 24 May 2020 07:11:11 +0000 Subject: [PATCH] feat: wrapping xml text in ctag to avoid error on special chars --- .../templates/feed/feed.xml.eex | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/podcast_feed_web/templates/feed/feed.xml.eex b/lib/podcast_feed_web/templates/feed/feed.xml.eex index d25fd30..d814dd5 100644 --- a/lib/podcast_feed_web/templates/feed/feed.xml.eex +++ b/lib/podcast_feed_web/templates/feed/feed.xml.eex @@ -2,44 +2,44 @@ <%= @podcast.link %> - <%= @podcast.language %> + ]]> ©2022 - <%= @podcast.webmaster %> - <%= @podcast.webmaster %> + ]]> + ]]> <%= @podcast.image.url %> - <%= @podcast.image.title %> + <![CDATA[<%= @podcast.image.title %>]]> <%= @podcast.image.link %> - <%= @podcast.owner.name %> - <%= @podcast.owner.email %> + ]]> + ]]> <%= @podcast.keywords |> Enum.join(", ") %> - <%= @podcast.explicit %> + ]]> <%= @podcast.pubDate |> Calendar.DateTime.Format.rfc2822 %> - <%= @podcast.title %> - College, school, or department owning the podcast - <%= @podcast.description %> - <%= @podcast.description %> - <%= @podcast.description %> + <![CDATA[<%= @podcast.title %>]]> + ]]> + ]]> + ]]> + List.last() %>]]> <%= @podcast.pubDate |> Calendar.DateTime.Format.rfc2822 %> <%= for item <- @items do %> - <%= item.title %> + <![CDATA[<%= item.title %>]]> <%= item.link %> <%= item.pubDate |> Calendar.DateTime.Format.rfc2822 %> - <%= item.description %> + ]]> <%= item.link %> <%= item.length |> format_length %> <%= item.summary %> - <%= item.keywords |> Enum.join(", ") %> + Enum.join(", ") %>]]> <%= item.explicit %> <% end %>