Fix links in text/plain posts not getting converted to HTML
This commit is contained in:
parent
0f7eb99efb
commit
7e38b460c6
|
@ -118,7 +118,7 @@ defmodule Clacks.UserActionsHelper do
|
||||||
{String.replace(content, ["\r\n", "\n"], "<br>"), mentions}
|
{String.replace(content, ["\r\n", "\n"], "<br>"), mentions}
|
||||||
end
|
end
|
||||||
|
|
||||||
@link_regex ~r/\bhttps?\S+\b/i
|
@link_regex ~r/\b(https?\S+)\b/i
|
||||||
|
|
||||||
defp replace_links(content) do
|
defp replace_links(content) do
|
||||||
Regex.replace(@link_regex, content, "<a href=\"\\1\">\\1</a>")
|
Regex.replace(@link_regex, content, "<a href=\"\\1\">\\1</a>")
|
||||||
|
|
Loading…
Reference in New Issue