X-Git-Url: http://these/git/?a=blobdiff_plain;ds=sidebyside;f=crates%2Fapi%2Fsrc%2Fcommunity%2Fban.rs;h=95c2bbc04175a1b043ae12bf34e7e10cd351e479;hb=3471f3533cb724b2cf6953d563aadfcc9f66c1d2;hp=33f6ef83305db2cc4e0868ad1abd66dd2a1c0668;hpb=2de994797e4fe8f569c903de35da55ccdf823fb8;p=lemmy.git diff --git a/crates/api/src/community/ban.rs b/crates/api/src/community/ban.rs index 33f6ef83..95c2bbc0 100644 --- a/crates/api/src/community/ban.rs +++ b/crates/api/src/community/ban.rs @@ -3,7 +3,12 @@ use actix_web::web::Data; use lemmy_api_common::{ community::{BanFromCommunity, BanFromCommunityResponse}, context::LemmyContext, - utils::{is_mod_or_admin, local_user_view_from_jwt, remove_user_data_in_community}, + utils::{ + is_mod_or_admin, + local_user_view_from_jwt, + remove_user_data_in_community, + sanitize_html_opt, + }, }; use lemmy_db_schema::{ source::{ @@ -81,7 +86,7 @@ impl Perform for BanFromCommunity { mod_person_id: local_user_view.person.id, other_person_id: data.person_id, community_id: data.community_id, - reason: data.reason.clone(), + reason: sanitize_html_opt(&data.reason), banned: Some(data.ban), expires, };