From b431c9bdf91570292553c7b8476d5eb3ab1772fa Mon Sep 17 00:00:00 2001 From: Apple Sheeple Date: Wed, 13 Sep 2023 20:27:31 +0300 Subject: [PATCH] Sanitize apub post body Signed-off-by: Apple Sheeple --- crates/apub/src/objects/post.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/apub/src/objects/post.rs b/crates/apub/src/objects/post.rs index 29867fced..2fc859ddf 100644 --- a/crates/apub/src/objects/post.rs +++ b/crates/apub/src/objects/post.rs @@ -238,13 +238,14 @@ impl Object for ApubPost { LanguageTag::to_language_id_single(page.language, &mut context.pool()).await?; let name = sanitize_html_federation(&name); + let body = sanitize_html_federation_opt(&body_slurs_removed); let embed_title = sanitize_html_federation_opt(&embed_title); let embed_description = sanitize_html_federation_opt(&embed_description); PostInsertForm { name, url: url.map(Into::into), - body: body_slurs_removed, + body, creator_id: creator.id, community_id: community.id, removed: None,