Skip to content

Commit dbd9db8

Browse files
committed
fix format text
1 parent 0bd9b20 commit dbd9db8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

inc/Handle.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function insert_answer() {
6767
$question_id = intval( $_POST['question_id'] );
6868

6969
$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'] );
7171

7272
$answers = array(
7373
'comment_status' => 'open',
@@ -133,7 +133,7 @@ public function update_answer() {
133133
dwqa_add_notice( __( 'Hello, Are you cheating huh?', 'dwqa' ), 'error' );
134134
}
135135

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'] );
137137
if ( empty( $answer_content ) ) {
138138
dwqa_add_notice( __( 'You must enter a valid answer content.', 'dwqa' ), 'error' );
139139
}
@@ -184,7 +184,7 @@ public function insert_comment() {
184184
if ( ! isset( $_POST['comment_post_ID'] ) ) {
185185
dwqa_add_notice( __( 'Missing post id.', 'dwqa' ), 'error', true );
186186
}
187-
$comment_content = isset( $_POST['comment'] ) ? sanitize_text_field( $_POST['comment'] ) : '';
187+
$comment_content = isset( $_POST['comment'] ) ? $_POST['comment'] : '';
188188
$comment_content = apply_filters( 'dwqa_pre_comment_content', $comment_content );
189189

190190
if ( empty( $comment_content ) ) {
@@ -237,7 +237,7 @@ public function update_comment() {
237237
dwqa_add_notice( __( 'Comment is missing', 'dwqa' ), 'error' );
238238
}
239239
$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'] : '';
241241
$comment_content = apply_filters( 'dwqa_pre_update_comment_content', $comment_content );
242242

243243
if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['_wpnonce'] ), '_dwqa_edit_comment' ) ) {
@@ -294,7 +294,7 @@ public function submit_question() {
294294
$tags = isset( $_POST['question-tag'] ) ?
295295
esc_html( $_POST['question-tag'] ): '';
296296

297-
$content = isset( $_POST['question-content'] ) ? sanitize_text_field( $_POST['question-content'] ) : '';
297+
$content = isset( $_POST['question-content'] ) ? $_POST['question-content'] : '';
298298
$content = apply_filters( 'dwqa_prepare_question_content', $content );
299299

300300
$user_id = 0;
@@ -456,7 +456,7 @@ public function update_question() {
456456
dwqa_add_notice( __( 'This post is not question.', 'dwqa' ), 'error' );
457457
}
458458

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'] );
460460

461461
$tags = isset( $_POST['question-tag'] ) ? esc_html( $_POST['question-tag'] ): '';
462462
$category = isset( $_POST['question-category'] ) ? intval( $_POST['question-category'] ) : 0;

0 commit comments

Comments
 (0)