Sanitize apub post body

Signed-off-by: Apple Sheeple <AppleSheeple@github>
This commit is contained in:
Apple Sheeple 2023-09-13 20:27:31 +03:00 committed by Felix Ableitner
parent 544d30f0d4
commit b431c9bdf9

View File

@ -238,13 +238,14 @@ impl Object for ApubPost {
LanguageTag::to_language_id_single(page.language, &mut context.pool()).await?; LanguageTag::to_language_id_single(page.language, &mut context.pool()).await?;
let name = sanitize_html_federation(&name); 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_title = sanitize_html_federation_opt(&embed_title);
let embed_description = sanitize_html_federation_opt(&embed_description); let embed_description = sanitize_html_federation_opt(&embed_description);
PostInsertForm { PostInsertForm {
name, name,
url: url.map(Into::into), url: url.map(Into::into),
body: body_slurs_removed, body,
creator_id: creator.id, creator_id: creator.id,
community_id: community.id, community_id: community.id,
removed: None, removed: None,