remove pub_date() -- use to_rfc2822 instead
_tag_activity.xml.eex used activity_content() instead of activity_description(), and did not escape html properly.
This commit is contained in:
parent
f597b1b3e6
commit
0f67eab384
|
@ -17,15 +17,6 @@ defmodule Pleroma.Web.Feed.FeedView do
|
|||
@days ~w(Mon Tue Wed Thu Fri Sat Sun)
|
||||
@months ~w(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
|
||||
|
||||
@spec pub_date(String.t() | DateTime.t()) :: String.t()
|
||||
def pub_date(date) when is_binary(date) do
|
||||
date
|
||||
|> Timex.parse!("{ISO:Extended}")
|
||||
|> pub_date
|
||||
end
|
||||
|
||||
def pub_date(%DateTime{} = date), do: to_rfc2822(date)
|
||||
|
||||
def prepare_activity(activity, opts \\ []) do
|
||||
object = Object.normalize(activity, fetch: false)
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
<guid isPermalink="true"><%= activity_context(@activity) %></guid>
|
||||
<link><%= activity_context(@activity) %></link>
|
||||
<pubDate><%= pub_date(@activity.data["published"]) %></pubDate>
|
||||
<pubDate><%= to_rfc2822(@activity.data["published"]) %></pubDate>
|
||||
|
||||
<description><%= activity_content(@data) %></description>
|
||||
<description><%= activity_description(@data) %></description>
|
||||
<%= for attachment <- @data["attachment"] || [] do %>
|
||||
<enclosure url="<%= attachment_href(attachment) %>" type="<%= attachment_type(attachment) %>"/>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue