From 6df3dc8489ac4105e2a8e41899227991537489e2 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Fri, 28 Dec 2018 22:34:30 +0100 Subject: questions: Don't strip content from messages closes #545 ("=" removed in Questions & Answers) --- includes/pages/user_questions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'includes/pages/user_questions.php') diff --git a/includes/pages/user_questions.php b/includes/pages/user_questions.php index 19999577..29925a4f 100644 --- a/includes/pages/user_questions.php +++ b/includes/pages/user_questions.php @@ -29,6 +29,7 @@ function user_questions() 'SELECT * FROM `Questions` WHERE NOT `AID` IS NULL AND `UID`=?', [$user->id] ); + foreach ($answered_questions as &$question) { $answer_user_source = User::find($question['AID']); $question['answer_user'] = User_Nick_render($answer_user_source); @@ -42,8 +43,8 @@ function user_questions() } else { switch ($request->input('action')) { case 'ask': - $question = strip_request_item_nl('question'); - if ($question != '' && $request->hasPostData('submit')) { + $question = request()->get('question'); + if (!empty($question) && $request->hasPostData('submit')) { DB::insert(' INSERT INTO `Questions` (`UID`, `Question`) VALUES (?, ?) -- cgit v1.2.3-54-g00ecf