@@ -67,7 +67,7 @@ public function insert_answer() {
67
67
$ question_id = intval ( $ _POST ['question_id ' ] );
68
68
69
69
$ answer_title = __ ( 'Answer for ' , 'dwqa ' ) . get_post_field ( 'post_title ' , $ question_id );
70
- $ answ_content = apply_filters ( 'dwqa_prepare_answer_content ' , sanitize_text_field ( $ _POST ['answer-content ' ] ) );
70
+ $ answ_content = apply_filters ( 'dwqa_prepare_answer_content ' , $ _POST ['answer-content ' ] );
71
71
72
72
$ answers = array (
73
73
'comment_status ' => 'open ' ,
@@ -133,7 +133,7 @@ public function update_answer() {
133
133
dwqa_add_notice ( __ ( 'Hello, Are you cheating huh? ' , 'dwqa ' ), 'error ' );
134
134
}
135
135
136
- $ answer_content = apply_filters ( 'dwqa_prepare_edit_answer_content ' , sanitize_text_field ( $ _POST ['answer_content ' ] ) );
136
+ $ answer_content = apply_filters ( 'dwqa_prepare_edit_answer_content ' , $ _POST ['answer_content ' ] );
137
137
if ( empty ( $ answer_content ) ) {
138
138
dwqa_add_notice ( __ ( 'You must enter a valid answer content. ' , 'dwqa ' ), 'error ' );
139
139
}
@@ -184,7 +184,7 @@ public function insert_comment() {
184
184
if ( ! isset ( $ _POST ['comment_post_ID ' ] ) ) {
185
185
dwqa_add_notice ( __ ( 'Missing post id. ' , 'dwqa ' ), 'error ' , true );
186
186
}
187
- $ comment_content = isset ( $ _POST ['comment ' ] ) ? sanitize_text_field ( $ _POST ['comment ' ] ) : '' ;
187
+ $ comment_content = isset ( $ _POST ['comment ' ] ) ? $ _POST ['comment ' ] : '' ;
188
188
$ comment_content = apply_filters ( 'dwqa_pre_comment_content ' , $ comment_content );
189
189
190
190
if ( empty ( $ comment_content ) ) {
@@ -237,7 +237,7 @@ public function update_comment() {
237
237
dwqa_add_notice ( __ ( 'Comment is missing ' , 'dwqa ' ), 'error ' );
238
238
}
239
239
$ comment_id = intval ( $ _POST ['comment_id ' ] );
240
- $ comment_content = isset ( $ _POST ['comment_content ' ] ) ? esc_html ( $ _POST ['comment_content ' ] ) : '' ;
240
+ $ comment_content = isset ( $ _POST ['comment_content ' ] ) ? $ _POST ['comment_content ' ] : '' ;
241
241
$ comment_content = apply_filters ( 'dwqa_pre_update_comment_content ' , $ comment_content );
242
242
243
243
if ( ! isset ( $ _POST ['_wpnonce ' ] ) || ! wp_verify_nonce ( sanitize_text_field ( $ _POST ['_wpnonce ' ] ), '_dwqa_edit_comment ' ) ) {
@@ -294,7 +294,7 @@ public function submit_question() {
294
294
$ tags = isset ( $ _POST ['question-tag ' ] ) ?
295
295
esc_html ( $ _POST ['question-tag ' ] ): '' ;
296
296
297
- $ content = isset ( $ _POST ['question-content ' ] ) ? sanitize_text_field ( $ _POST ['question-content ' ] ) : '' ;
297
+ $ content = isset ( $ _POST ['question-content ' ] ) ? $ _POST ['question-content ' ] : '' ;
298
298
$ content = apply_filters ( 'dwqa_prepare_question_content ' , $ content );
299
299
300
300
$ user_id = 0 ;
@@ -456,7 +456,7 @@ public function update_question() {
456
456
dwqa_add_notice ( __ ( 'This post is not question. ' , 'dwqa ' ), 'error ' );
457
457
}
458
458
459
- $ question_content = apply_filters ( 'dwqa_prepare_edit_question_content ' , sanitize_text_field ( $ _POST ['question_content ' ] ) );
459
+ $ question_content = apply_filters ( 'dwqa_prepare_edit_question_content ' , $ _POST ['question_content ' ] );
460
460
461
461
$ tags = isset ( $ _POST ['question-tag ' ] ) ? esc_html ( $ _POST ['question-tag ' ] ): '' ;
462
462
$ category = isset ( $ _POST ['question-category ' ] ) ? intval ( $ _POST ['question-category ' ] ) : 0 ;
0 commit comments