aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/formatter.ex
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-09-28 17:20:28 +0200
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-09-28 17:32:27 +0200
commita3cffd3566495edfe823b75142524717d0b64b24 (patch)
treed9ecd88a8bf0adc60180e4c6e266153cb47a7f98 /lib/pleroma/formatter.ex
parent34b6d444d61c40afe34e06980ab3566884504a2b (diff)
downloadpleroma-a3cffd3566495edfe823b75142524717d0b64b24.tar.gz
formatter: Stop using phoenix HTML and format it ourselves
* Pheonix has an extra scheme whitelist conflicting with ours * Pheonix doesn’t seems to do URL encoding, just HTML encoding Closes: https://git.pleroma.social/pleroma/pleroma/issues/307
Diffstat (limited to 'lib/pleroma/formatter.ex')
-rw-r--r--lib/pleroma/formatter.ex8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
index 62f54a3f2..d5565a2ca 100644
--- a/lib/pleroma/formatter.ex
+++ b/lib/pleroma/formatter.ex
@@ -222,13 +222,7 @@ defmodule Pleroma.Formatter do
subs =
subs ++
Enum.map(links, fn {uuid, url} ->
- {:safe, link} = Phoenix.HTML.Link.link(url, to: url)
-
- link =
- link
- |> IO.iodata_to_binary()
-
- {uuid, link}
+ {uuid, "<a href=\"#{url}\">#{url}</a>"}
end)
{subs, uuid_text}