Slightly better html link regex.

This commit is contained in:
Roger Braun 2017-06-18 13:29:30 +02:00
commit a9bfbcae80
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
defmodule Pleroma.Formatter do
alias Pleroma.User
@link_regex ~r/https?:\/\/[\w\.\/?=\-#]+[\w]/
@link_regex ~r/https?:\/\/[\w\.\/?=\-#%&]+[\w]/
def linkify(text) do
Regex.replace(@link_regex, text, "<a href='\\0'>\\0</a>")
end