common api: utils: remove newline to <br> conversion from bare HTML to be consistent...
authorWilliam Pitcock <nenolod@dereferenced.org>
Thu, 10 Jan 2019 03:45:58 +0000 (03:45 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Thu, 10 Jan 2019 03:45:58 +0000 (03:45 +0000)
ok @lanodan

lib/pleroma/web/common_api/utils.ex

index 187e908ce3df785292d3634f71eb2bb6ff94b734..7e30d224cef348d201ad67d3fb1da2dadaff6cf5 100644 (file)
@@ -136,7 +136,6 @@ defmodule Pleroma.Web.CommonAPI.Utils do
   def format_input(text, mentions, _tags, "text/html") do
     text
     |> Formatter.html_escape("text/html")
-    |> String.replace(~r/\r?\n/, "<br>")
     |> (&{[], &1}).()
     |> Formatter.add_user_links(mentions)
     |> Formatter.finalize()