Pleroma.Web.TwitterAPI.ActivityView: Harden TwitterAPI against remnant of prismo

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-11-01 15:07:27 +01:00
parent 4fab4e9ba4
commit 3c7d4ff271
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE

View file

@ -287,7 +287,7 @@ def render_content(%{"type" => object_type} = object) when object_type in ["Arti
summary = object["name"] || object["summary"]
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"]