From 6e9fcaa043b4211ef21a494f9892dd19ba8a572c Mon Sep 17 00:00:00 2001 From: Bozhidar Slaveykov Date: Wed, 19 Jan 2022 12:26:08 +0200 Subject: [PATCH] update --- .../Comment/Http/Controllers/CommentController.php | 6 +----- .../resources/views/admin/comments/comment_item.blade.php | 2 +- .../views/admin/notifications/new_comment.blade.php | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/MicroweberPackages/Comment/Http/Controllers/CommentController.php b/src/MicroweberPackages/Comment/Http/Controllers/CommentController.php index 72772c9055e..a6ce1df09a0 100644 --- a/src/MicroweberPackages/Comment/Http/Controllers/CommentController.php +++ b/src/MicroweberPackages/Comment/Http/Controllers/CommentController.php @@ -33,10 +33,6 @@ public function postComment(Request $request) } } - - - - $rules = []; $inputs = $request->all(); if(isset($inputs['rel']) and !isset($inputs['rel_type'])){ @@ -104,7 +100,7 @@ public function postComment(Request $request) } if (!empty($saveComment['comment_body']) and !empty($inputs['format']) and $inputs['format'] == 'markdown') { - $saveComment['comment_body'] = Markdown::convertToHtml($saveComment['comment_body']); + $saveComment['comment_body'] = htmlentities($saveComment['comment_body']); } $save = Comment::create($saveComment); diff --git a/src/MicroweberPackages/Comment/resources/views/admin/comments/comment_item.blade.php b/src/MicroweberPackages/Comment/resources/views/admin/comments/comment_item.blade.php index 28c16a3ea4d..e889a68f913 100644 --- a/src/MicroweberPackages/Comment/resources/views/admin/comments/comment_item.blade.php +++ b/src/MicroweberPackages/Comment/resources/views/admin/comments/comment_item.blade.php @@ -58,7 +58,7 @@
{{ $comment['comment_body'] }}
diff --git a/src/MicroweberPackages/Comment/resources/views/admin/notifications/new_comment.blade.php b/src/MicroweberPackages/Comment/resources/views/admin/notifications/new_comment.blade.php index 5ed2b921ab4..69f2c8ecc7a 100644 --- a/src/MicroweberPackages/Comment/resources/views/admin/notifications/new_comment.blade.php +++ b/src/MicroweberPackages/Comment/resources/views/admin/notifications/new_comment.blade.php @@ -62,7 +62,7 @@ says:
-

{!! $notification['comment_body'] !!}

+

{{ $notification['comment_body'] }}