X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fformatter.ex;h=cf2944c38fffa668ba6526dfd415af9ea10458ef;hb=58539e13573681238fdd4d4e7334666389084be3;hp=93cd12fa69132d920900fadef4ff329bc737a0ae;hpb=6aa65b68b82c8ad7f6246dc5ccf1ac7673ce3e22;p=akkoma diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index 93cd12fa6..cf2944c38 100644 --- a/lib/pleroma/formatter.ex +++ b/lib/pleroma/formatter.ex @@ -188,11 +188,7 @@ defmodule Pleroma.Formatter do ] # TODO: make it use something other than @link_regex - def html_escape(text, "text/html") do - HtmlSanitizeEx.basic_html(text) - end - - def html_escape(text, "text/plain") do + def html_escape(text) do Regex.split(@link_regex, text, include_captures: true) |> Enum.map_every(2, fn chunk -> {:safe, part} = Phoenix.HTML.html_escape(chunk)