commit: 90c0777dc43e5afbb5f1412ade2dbb0e1c7115ff
parent: 8764d613c48c64a5f6e44ae3b65096c58bd225c8
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 1 Mar 2019 23:26:36 +0100
mix.deps: Change auto_linker to my branch
Diffstat:
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
@@ -14,7 +14,8 @@ defmodule Pleroma.Formatter do
hashtag_handler: &Pleroma.Formatter.hashtag_handler/4,
mention: true,
mention_handler: &Pleroma.Formatter.mention_handler/4,
- scheme: true
+ phone: false,
+ extra_prefixes: Pleroma.Config.get([:uri_schemes, :valid_schemes])
def escape_mention_handler("@" <> nickname = mention, buffer, _, _) do
case User.get_cached_by_nickname(nickname) do
diff --git a/lib/pleroma/web/rich_media/helpers.ex b/lib/pleroma/web/rich_media/helpers.ex
@@ -14,7 +14,7 @@ defmodule Pleroma.Web.RichMedia.Helpers do
validate_tld = Application.get_env(:auto_linker, :opts)[:validate_tld]
page_url
- |> AutoLinker.Parser.url?(scheme: true, validate_tld: validate_tld)
+ |> AutoLinker.Parser.is_url?(scheme: true, validate_tld: validate_tld)
|> parse_uri(page_url)
end
diff --git a/mix.exs b/mix.exs
@@ -167,9 +167,7 @@ defmodule Pleroma.Mixfile do
{:floki, "~> 0.25"},
{:timex, "~> 3.5"},
{:ueberauth, "~> 0.4"},
- {:auto_linker,
- git: "https://git.pleroma.social/pleroma/auto_linker.git",
- ref: "95e8188490e97505c56636c1379ffdf036c1fdde"},
+ {:auto_linker, git: "https://hacktivis.me/git/auto_linker.git", branch: "lanodan/master"},
{:http_signatures,
git: "https://git.pleroma.social/pleroma/http_signatures.git",
ref: "293d77bb6f4a67ac8bde1428735c3b42f22cbb30"},
diff --git a/mix.lock b/mix.lock
@@ -1,6 +1,6 @@
%{
"accept": {:hex, :accept, "0.3.5", "b33b127abca7cc948bbe6caa4c263369abf1347cfa9d8e699c6d214660f10cd1", [:rebar3], [], "hexpm", "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8"},
- "auto_linker": {:git, "https://git.pleroma.social/pleroma/auto_linker.git", "95e8188490e97505c56636c1379ffdf036c1fdde", [ref: "95e8188490e97505c56636c1379ffdf036c1fdde"]},
+ "auto_linker": {:git, "https://hacktivis.me/git/auto_linker.git", "71425bb5a4c0d8755b00a469763b75db8ce77899", [branch: "lanodan/master"]},
"base62": {:hex, :base62, "1.2.1", "4866763e08555a7b3917064e9eef9194c41667276c51b59de2bc42c6ea65f806", [:mix], [{:custom_base, "~> 0.2.1", [hex: :custom_base, repo: "hexpm", optional: false]}], "hexpm", "3b29948de2013d3f93aa898c884a9dff847e7aec75d9d6d8c1dc4c61c2716c42"},
"base64url": {:hex, :base64url, "0.0.1", "36a90125f5948e3afd7be97662a1504b934dd5dac78451ca6e9abf85a10286be", [:rebar], [], "hexpm"},
"bbcode": {:git, "https://git.pleroma.social/pleroma/elixir-libraries/bbcode.git", "f2d267675e9a7e1ad1ea9beb4cc23382762b66c2", [ref: "v0.2.0"]},
diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs
@@ -131,7 +131,8 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
{:ok, user} =
UserBuilder.insert(%{nickname: "user__test", ap_id: "http://foo.com/user__test"})
- text = "**hello world**\n\n*another @user__test and @user__test google.com paragraph*"
+ text =
+ "**hello world**\n\n*another @user__test and @user__test http://google.com paragraph*"
{output, _, _} = Utils.format_input(text, "text/markdown")
@@ -140,7 +141,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
user.id
}" href="http://foo.com/user__test" rel="ugc">@<span>user__test</span></a></span> and <span class="h-card"><a class="u-url mention" data-user="#{
user.id
- }" href="http://foo.com/user__test" rel="ugc">@<span>user__test</span></a></span> <a href="http://google.com" rel="ugc">google.com</a> paragraph</em></p>)
+ }" href="http://foo.com/user__test" rel="ugc">@<span>user__test</span></a></span> <a href="http://google.com" rel="ugc">http://google.com</a> paragraph</em></p>)
end
end
diff --git a/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs b/test/web/mastodon_api/controllers/account_controller/update_credentials_test.exs
@@ -280,7 +280,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
test "update fields", %{conn: conn} do
fields = [
%{"name" => "<a href=\"http://google.com\">foo</a>", "value" => "<script>bar</script>"},
- %{"name" => "link.io", "value" => "cofe.io"}
+ %{"name" => "link.io", "value" => "http://cofe.io"}
]
account_data =
@@ -292,7 +292,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
%{"name" => "<a href=\"http://google.com\">foo</a>", "value" => "bar"},
%{
"name" => "link.io",
- "value" => ~S(<a href="http://cofe.io" rel="ugc">cofe.io</a>)
+ "value" => ~S(<a href="http://cofe.io" rel="ugc">http://cofe.io</a>)
}
]
@@ -301,7 +301,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
"name" => "<a href=\"http://google.com\">foo</a>",
"value" => "<script>bar</script>"
},
- %{"name" => "link.io", "value" => "cofe.io"}
+ %{"name" => "link.io", "value" => "http://cofe.io"}
]
end
@@ -376,7 +376,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
fields = [
%{"name" => "foo", "value" => "bar"},
- %{"name" => "link", "value" => "cofe.io"}
+ %{"name" => "link", "value" => "http://cofe.io"}
]
assert %{"error" => "Invalid request"} ==