mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 11:21:32 +00:00
Sanitize apub post body
Signed-off-by: Apple Sheeple <AppleSheeple@github>
This commit is contained in:
parent
544d30f0d4
commit
b431c9bdf9
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue