Skip to content

Commit

Permalink
fix: added missing conversion to HTML entities
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Feb 14, 2023
1 parent ee509f2 commit fecc803
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions phpmyfaq/admin/category.main.php
Expand Up @@ -21,6 +21,7 @@
use phpMyFAQ\Category\CategoryRelation;
use phpMyFAQ\Database;
use phpMyFAQ\Filter;
use phpMyFAQ\Strings;

if (!defined('IS_VALID_PHPMYFAQ')) {
http_response_code(400);
Expand Down Expand Up @@ -319,9 +320,10 @@
foreach ($category->getCategoryTree() as $id => $cat) {
// CategoryHelper translated in this language?
if ($cat['lang'] == $lang) {
$categoryName = $cat['name'];
$categoryName = Strings::htmlentities($cat['name']);
} else {
$categoryName = $cat['name'] . ' (' . $languageCodes[strtoupper($cat['lang'])] . ')';
$categoryName = Strings::htmlentities($cat['name']) .
' (' . $languageCodes[strtoupper($cat['lang'])] . ')';
}


Expand Down

0 comments on commit fecc803

Please sign in to comment.