Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 9b7ca65

Browse files
author
Jamie Snape
committed
Escape variables in comments module
1 parent 552c856 commit 9b7ca65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/comments/controllers/components/CommentComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function getComments($item, $limit, $offset)
3535
foreach ($comments as $comment) {
3636
$commentArray = $comment->toArray();
3737
$commentArray['user'] = $comment->getUser()->toArray();
38-
$commentArray['comment'] = htmlentities($commentArray['comment']);
38+
$commentArray['comment'] = htmlspecialchars($commentArray['comment'], ENT_QUOTES, 'UTF-8');
3939
$commentArray['ago'] = $dateComponent->ago($commentArray['date']);
4040
$commentsList[] = $commentArray;
4141
}

0 commit comments

Comments
 (0)