Skip to content

Commit 53099a9

Browse files
committed
fix: added missing conversion to HTML entities
1 parent fb88fe5 commit 53099a9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: phpmyfaq/admin/record.comments.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use phpMyFAQ\Date;
2121
use phpMyFAQ\Entity\CommentType;
2222
use phpMyFAQ\Faq;
23+
use phpMyFAQ\Strings;
2324

2425
if (!defined('IS_VALID_PHPMYFAQ')) {
2526
http_response_code(400);
@@ -73,7 +74,7 @@
7374
<td>
7475
<span style="font-weight: bold;">
7576
<a href="mailto:<?= $faqComment->getEmail() ?>">
76-
<?= $faqComment->getUsername() ?>
77+
<?= Strings::htmlentities($faqComment->getUsername()) ?>
7778
</a> |
7879
<?= $date->format(date('Y-m-d H:i', $faqComment->getDate())) ?> |
7980
<a href="<?php printf(
@@ -84,8 +85,8 @@
8485
) ?>">
8586
<?= $faq->getRecordTitle($faqComment->getRecordId()) ?>
8687
</a>
87-
</span><br/>
88-
<?= $faqComment->getComment() ?>
88+
</span><br>
89+
<?= Strings::htmlentities($faqComment->getComment()) ?>
8990
</td>
9091
</tr>
9192
<?php

0 commit comments

Comments
 (0)