- // Do the update
- let content_slurs_removed =
- remove_slurs(&data.content.to_owned(), &context.settings().slur_regex());
+ let language_id = self.language_id;
+ CommunityLanguage::is_allowed_community_language(
+ &mut context.pool(),
+ language_id,
+ orig_comment.community.id,
+ )
+ .await?;
+
+ // Update the Content
+ let content = data
+ .content
+ .as_ref()
+ .map(|c| remove_slurs(c, &local_site_to_slur_regex(&local_site)));
+ is_valid_body_field(&content, false)?;
+ let content = sanitize_html_opt(&content);
+