Escape HTML instead of discarding it.
This commit is contained in:
parent
4647bcd6e6
commit
66e78c3ec4
2 changed files with 3 additions and 2 deletions
|
|
@ -58,7 +58,8 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
|||
end
|
||||
|
||||
def format_input(text, mentions, tags) do
|
||||
HtmlSanitizeEx.strip_tags(text)
|
||||
Phoenix.HTML.html_escape(text)
|
||||
|> elem(1)
|
||||
|> Formatter.linkify
|
||||
|> String.replace("\n", "<br>\n")
|
||||
|> add_user_links(mentions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue