Add href to in-reply-to.
[akkoma] / lib / pleroma / web / twitter_api / utils.ex
index f02c8ad6da2b83977c3e0e8ed4808872f518f28a..2c3507dfbd6936158b29650c9edf25164fa81e3b 100644 (file)
@@ -15,13 +15,13 @@ defmodule Pleroma.Web.TwitterAPI.Utils do
         "<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
 
@@ -44,13 +44,10 @@ defmodule Pleroma.Web.TwitterAPI.Utils do
     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