Let wp_update_comment() handle comment sanitization

This commit is contained in:
Tetrakern 2023-12-16 00:22:04 +01:00
parent aea191846b
commit 50a57ed2ef

View File

@ -503,7 +503,7 @@ function fictioneer_ajax_edit_comment() {
// Update
$edit_time = time();
$comment['comment_content'] = wp_kses_post( $_POST['content'] );
$comment['comment_content'] = $_POST['content'];
if ( ! user_can( $user, 'unfiltered_html' ) ) {
$comment['comment_content'] = sanitize_textarea_field( $comment['comment_content'] );