From a2bb5d890d95062e146a4ec6f5923d77ac44a1b9 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Tue, 5 Feb 2019 05:06:17 +0000 Subject: [PATCH] html: don't attempt to parse nil content --- lib/pleroma/html.ex | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pleroma/html.ex b/lib/pleroma/html.ex index bf5daa948..b4a4742ee 100644 --- a/lib/pleroma/html.ex +++ b/lib/pleroma/html.ex @@ -59,6 +59,8 @@ defp generate_scrubber_signature(scrubbers) do end) end + def extract_first_external_url(_, nil), do: {:error, "No content"} + def extract_first_external_url(object, content) do key = "URL|#{object.id}"