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 Oct 4, 2023
1 parent 4dc881a commit 5310cb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion phpmyfaq/admin/record.edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ class="form-control">
printf(
'<li><a href="../%s">%s</a> ',
$att->buildUrl(),
$att->getFilename()
Strings::htmlentities($att->getFilename())
);
if ($user->perm->hasPermission($currentUserId, 'delattachment')) {
printf(
Expand Down
3 changes: 2 additions & 1 deletion phpmyfaq/src/phpMyFAQ/Helper/AttachmentHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
namespace phpMyFAQ\Helper;

use phpMyFAQ\Attachment\AttachmentAbstract;
use phpMyFAQ\Strings;
use phpMyFAQ\Translation;

/**
Expand Down Expand Up @@ -45,7 +46,7 @@ public function renderAttachmentList(array $attachmentList): string
'<li><i class="fa fa-%s" aria-hidden="true"></i> <a href="%s">%s</a></li>',
$this->mapMimeTypeToIcon($attachment->getMimeType()),
$attachment->buildUrl(),
$attachment->getFilename()
Strings::htmlentities($attachment->getFilename())
);
}

Expand Down

0 comments on commit 5310cb8

Please sign in to comment.