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

Commit

Permalink
Escape variables in comments module
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Dec 8, 2014
1 parent 552c856 commit 9b7ca65
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getComments($item, $limit, $offset)
foreach ($comments as $comment) {
$commentArray = $comment->toArray();
$commentArray['user'] = $comment->getUser()->toArray();
$commentArray['comment'] = htmlentities($commentArray['comment']);
$commentArray['comment'] = htmlspecialchars($commentArray['comment'], ENT_QUOTES, 'UTF-8');
$commentArray['ago'] = $dateComponent->ago($commentArray['date']);
$commentsList[] = $commentArray;
}
Expand Down

0 comments on commit 9b7ca65

Please sign in to comment.