diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-12-28 22:34:30 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-12-28 23:08:39 +0100 |
commit | 6df3dc8489ac4105e2a8e41899227991537489e2 (patch) | |
tree | e95cf0cf36c6daf1485695246923c71c565a7ebc /includes/view | |
parent | 012d5a47227ad80753fc1178ccc85c3b15dd5c09 (diff) |
questions: Don't strip content from messages
closes #545 ("=" removed in Questions & Answers)
Diffstat (limited to 'includes/view')
-rw-r--r-- | includes/view/Questions_view.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/view/Questions_view.php b/includes/view/Questions_view.php index 29629074..4d57edf9 100644 --- a/includes/view/Questions_view.php +++ b/includes/view/Questions_view.php @@ -12,12 +12,12 @@ function Questions_view($open_questions, $answered_questions, $ask_action) $question['actions'] = form([ form_submit('submit', __('delete'), 'btn-default btn-xs') ], page_link_to('user_questions', ['action' => 'delete', 'id' => $question['QID']])); - $question['Question'] = str_replace("\n", '<br />', $question['Question']); + $question['Question'] = nl2br(htmlspecialchars($question['Question'])); } foreach ($answered_questions as &$question) { - $question['Question'] = str_replace("\n", '<br />', $question['Question']); - $question['Answer'] = str_replace("\n", '<br />', $question['Answer']); + $question['Question'] = nl2br(htmlspecialchars($question['Question'])); + $question['Answer'] = nl2br(htmlspecialchars($question['Answer'])); $question['actions'] = form([ form_submit('submit', __('delete'), 'btn-default btn-xs') ], page_link_to('user_questions', ['action' => 'delete', 'id' => $question['QID']])); |