Skip to content

Commit a1881aa

Browse files
authored
Improve Magefan Comments
Added nl2br to the comment text
1 parent 0d7098c commit a1881aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

view/frontend/templates/post/view/comments/magefan/comment.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<?php } ?>
2626
<div class="c-post c-post-<?php echo $comment->getId() ?>" id="c-post-<?php echo $comment->getId() ?>">
2727
<div class="p-name"><?php echo $block->escapeHtml($comment->getAuthor()->getNickname()) ?></div>
28-
<div class="p-text"><?php echo $block->escapeHtml($comment->getText()) ?></div>
28+
<div class="p-text"><?php echo nl2br($block->escapeHtml($comment->getText())) ?></div>
2929
<div class="p-actions">
3030
<a href="#" class="reply-action" data-comment="<?php echo $comment->isReply() ? $comment->getParentId() : $comment->getId() ?>" title="<?php echo __('Reply') ?>"><?php echo __('Reply') ?></a>
3131
<span class="publish-date"><?php echo $block->escapeHtml($comment->getPublishDate('M d, Y H:i')) ?></span>
@@ -53,4 +53,4 @@
5353
</div>
5454
<?php } ?>
5555
</div>
56-
</div>
56+
</div>

0 commit comments

Comments
 (0)