diff --git a/lib/pleroma/web/rich_media/parser.ex b/lib/pleroma/web/rich_media/parser.ex index 7c5fed2bf..15eaaf735 100644 --- a/lib/pleroma/web/rich_media/parser.ex +++ b/lib/pleroma/web/rich_media/parser.ex @@ -96,7 +96,7 @@ defp parse_uri(true, url) do |> validate_page_url end - defp parse_uri(_, _), do: {:error, "not an URL"} + defp parse_uri(_, _), do: {:error, "not a URL"} defp get_tld(host) do host diff --git a/test/pleroma/web/rich_media/parser_test.exs b/test/pleroma/web/rich_media/parser_test.exs index bf7864aa7..77e37784b 100644 --- a/test/pleroma/web/rich_media/parser_test.exs +++ b/test/pleroma/web/rich_media/parser_test.exs @@ -121,13 +121,13 @@ test "refuses to crawl plain HTTP and other scheme URL" do res = Parser.parse(url) assert {:error, {:url, "scheme mismatch"}} == res or - {:error, {:url, "not an URL"}} == res + {:error, {:url, "not a URL"}} == res end) end test "refuses to crawl malformed URLs" do url = "example.com[]/ogp" - assert {:error, {:url, "not an URL"}} == Parser.parse(url) + assert {:error, {:url, "not a URL"}} == Parser.parse(url) end test "refuses to crawl URLs of private network from posts" do