diff options
| author | lain <lain@soykaf.club> | 2018-04-22 09:56:24 +0200 | 
|---|---|---|
| committer | lain <lain@soykaf.club> | 2018-04-22 09:56:24 +0200 | 
| commit | 114ca9e069a0914cc1ad8bf13690818eb132b0bf (patch) | |
| tree | aefde904a4f64ed848553fb162c604fc7de51cda /lib | |
| parent | 22bfeac25612776fa7815573f175d6bf6b5537bd (diff) | |
| parent | 26af5bad338b9c40918964379c6bb9916ca8b066 (diff) | |
| download | pleroma-114ca9e069a0914cc1ad8bf13690818eb132b0bf.tar.gz pleroma-114ca9e069a0914cc1ad8bf13690818eb132b0bf.zip | |
Merge branch 'develop' into fix/note-count-not-updating
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/pleroma/formatter.ex | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index 515909af1..a708a275e 100644 --- a/lib/pleroma/formatter.ex +++ b/lib/pleroma/formatter.ex @@ -144,7 +144,7 @@ defmodule Pleroma.Formatter do      @emoji    end -  @link_regex ~r/https?:\/\/[\w\.\/?=\-#\+%&@~\(\):]+[\w\/]/u +  @link_regex ~r/https?:\/\/[\w\.\/?=\-#\+%&@~'\(\):]+[\w\/]/u    def html_escape(text) do      Regex.split(@link_regex, text, include_captures: true) @@ -168,7 +168,10 @@ defmodule Pleroma.Formatter do      subs =        subs ++          Enum.map(links, fn {uuid, url} -> -          {uuid, "<a href='#{url}'>#{url}</a>"} +          {:safe, link} = Phoenix.HTML.Link.link(url, to: url) +          link = link +          |> IO.iodata_to_binary +          {uuid, link}          end)      {subs, uuid_text} | 
