CommonAPI: Newlines -> br for chat messages.
This commit is contained in:
parent
8ff3425828
commit
af9090238e
2 changed files with 23 additions and 0 deletions
|
|
@ -54,6 +54,9 @@ defmodule Pleroma.Web.CommonAPI do
|
|||
content
|
||||
|> Formatter.html_escape("text/plain")
|
||||
|> Formatter.linkify()
|
||||
|> (fn {text, mentions, tags} ->
|
||||
{String.replace(text, ~r/\r?\n/, "<br>"), mentions, tags}
|
||||
end).()
|
||||
|
||||
text
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue