"<a href=\"#{URI.encode(href)}\" class='attachment'>#{Path.basename(href)}</a>"
_ -> ""
end)
- Enum.join([text | attachment_text], "<br />\n")
+ Enum.join([text | attachment_text], "<br>\n")
end
def format_input(text, mentions) do
HtmlSanitizeEx.strip_tags(text)
|> Formatter.linkify
- |> String.replace("\n", "<br />\n")
+ |> String.replace("\n", "<br>\n")
|> add_user_links(mentions)
end
end)
end
- def wrap_in_p(text), do: "<p>#{text}</p>"
-
def make_content_html(status, mentions, attachments) do
status
|> format_input(mentions)
|> add_attachments(attachments)
- |> wrap_in_p
end
def make_context(%Activity{data: %{"context" => context}}), do: context