Linkify fixes.
This commit is contained in:
parent
6dfa62800a
commit
7da978f3f5
2 changed files with 16 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
defmodule Pleroma.Formatter do
|
||||
alias Pleroma.User
|
||||
|
||||
@link_regex ~r/https?:\/\/[\w\.\/?=\-#%&]+[\w]/u
|
||||
@link_regex ~r/https?:\/\/[\w\.\/?=\-#%&@~]+[\w\/]/u
|
||||
def linkify(text) do
|
||||
Regex.replace(@link_regex, text, "<a href='\\0'>\\0</a>")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue