From f2550d0c6719c54ab193ec39f8166c21478eda68 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 20 Apr 2024 13:33:43 +0100 Subject: [PATCH] check quote url --- utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 4b44a0557..15e60adeb 100644 --- a/utils.py +++ b/utils.py @@ -4763,7 +4763,10 @@ def get_quote_toot_url(post_json_object: str) -> str: 'toot:quoteReply', '_misskey_quote') for fieldname in object_quote_url_fields: if post_json_object['object'].get(fieldname): - return post_json_object['object'][fieldname] + quote_url = post_json_object['object'][fieldname] + if isinstance(quote_url, str): + if resembles_url(quote_url): + return remove_html(quote_url) # More correct ActivityPub implementation - adding a Link tag if post_json_object['object'].get('tag'):