aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-11-01 09:55:38 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2018-11-01 09:55:38 +0100
commit755f166406afbe7def824139fb52d1bc442165b2 (patch)
tree0866a0f071709b61c847b4075870aae73b156fce
parent33587f5cb4650842798bea9fb3b407afc7179259 (diff)
downloadpleroma-755f166406afbe7def824139fb52d1bc442165b2.tar.gz
Pleroma.Web.MastodonAPI.StatusView: Do not fail when URL isn’t a string
-rw-r--r--lib/pleroma/web/mastodon_api/views/status_view.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex
index 80e80c8f5..1efd99470 100644
--- a/lib/pleroma/web/mastodon_api/views/status_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/status_view.ex
@@ -240,7 +240,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
summary = object["name"]
content =
- if !!summary and summary != "" do
+ if !!summary and summary != "" and is_bitstring(object["url"]) do
"<p><a href=\"#{object["url"]}\">#{summary}</a></p>#{object["content"]}"
else
object["content"]