aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/formatter.ex
diff options
context:
space:
mode:
authorSergey Suprunenko <suprunenko.s@gmail.com>2019-05-22 04:04:20 +0000
committerkaniini <nenolod@gmail.com>2019-05-22 04:04:20 +0000
commit913484817076bf5ca4bdbe7c3c1ff34f7debd3e5 (patch)
tree9618e5789dcc534d2bc84699724828f7ada19d94 /lib/pleroma/formatter.ex
parentbe6b57193a99a32134546efb667391eda4d4acdf (diff)
downloadpleroma-913484817076bf5ca4bdbe7c3c1ff34f7debd3e5.tar.gz
Do not truncate DM when it contains newlines and safe_dm_mentions is set to true
Diffstat (limited to 'lib/pleroma/formatter.ex')
-rw-r--r--lib/pleroma/formatter.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
index 3d7c36d21..3e3b9fe97 100644
--- a/lib/pleroma/formatter.ex
+++ b/lib/pleroma/formatter.ex
@@ -8,7 +8,7 @@ defmodule Pleroma.Formatter do
alias Pleroma.User
alias Pleroma.Web.MediaProxy
- @safe_mention_regex ~r/^(\s*(?<mentions>@.+?\s+)+)(?<rest>.*)/
+ @safe_mention_regex ~r/^(\s*(?<mentions>@.+?\s+)+)(?<rest>.*)/s
@link_regex ~r"((?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~%:/?#[\]@!\$&'\(\)\*\+,;=.]+)|[0-9a-z+\-\.]+:[0-9a-z$-_.+!*'(),]+"ui
@markdown_characters_regex ~r/(`|\*|_|{|}|[|]|\(|\)|#|\+|-|\.|!)/