From cfb4975fdf4ddabcd7f51808c67a92db6eac586c Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 19 Jan 2023 10:30:26 -0700 Subject: [PATCH] Unlinkify profile values in edit fields --- users/models/identity.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/users/models/identity.py b/users/models/identity.py index 4f4320a..864c572 100644 --- a/users/models/identity.py +++ b/users/models/identity.py @@ -891,7 +891,18 @@ class Identity(StatorModel): } result["source"] = { "note": html_to_plaintext(self.summary) if self.summary else "", - "fields": result["fields"], + "fields": ( + [ + { + "name": m["name"], + "value": strip_html(m["value"], linkify=False), + "verified_at": None, + } + for m in self.metadata + ] + if self.metadata + else [] + ), "privacy": privacy_map[ Config.load_identity(self).default_post_visibility ],