projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bugfix/common-api-visibility-orphan' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
common_api
/
utils.ex
diff --git
a/lib/pleroma/web/common_api/utils.ex
b/lib/pleroma/web/common_api/utils.ex
index c7b0d7935f1ed6f74287fcf05100f576075c4f02..869f4c5661c5cef438ee3a3cf7b45dd7745d0d93 100644
(file)
--- a/
lib/pleroma/web/common_api/utils.ex
+++ b/
lib/pleroma/web/common_api/utils.ex
@@
-64,7
+64,6
@@
defmodule Pleroma.Web.CommonAPI.Utils do
def make_content_html(status, mentions, attachments, tags, no_attachment_links \\ false) do
status
def make_content_html(status, mentions, attachments, tags, no_attachment_links \\ false) do
status
- |> String.replace("\r", "")
|> format_input(mentions, tags)
|> maybe_add_attachments(attachments, no_attachment_links)
end
|> format_input(mentions, tags)
|> maybe_add_attachments(attachments, no_attachment_links)
end
@@
-95,7
+94,7
@@
defmodule Pleroma.Web.CommonAPI.Utils do
def format_input(text, mentions, tags) do
text
|> Formatter.html_escape()
def format_input(text, mentions, tags) do
text
|> Formatter.html_escape()
- |> String.replace(
"\n"
, "<br>")
+ |> String.replace(
~r/\r?\n/
, "<br>")
|> (&{[], &1}).()
|> Formatter.add_links()
|> Formatter.add_user_links(mentions)
|> (&{[], &1}).()
|> Formatter.add_links()
|> Formatter.add_user_links(mentions)