Skip to content

Commit

Permalink
Restore rs2html() $htmlspecialchars param behavior
Browse files Browse the repository at this point in the history
Regression introduced by bda6e1e.

Fixes #968, PR #969

Signed-off-by: Damien Regad <dregad@mantisbt.org>

Changes from original contribution:
- extract trim() call from if statement
- revised commit message
- backport to hotfix/5.22 branch
  • Loading branch information
bblemm authored and dregad committed May 12, 2023
1 parent 2ff5c63 commit 93fa678
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tohtml.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ function mime_content_type ($file) {

default:
if ($v) {
$v = htmlspecialchars(stripslashes(trim($v)));
$v = trim($v);
if ($htmlspecialchars) {
$v = htmlspecialchars($v);
}
} elseif ($v === null) {
$v = '(NULL)';
} else {
Expand Down

0 comments on commit 93fa678

Please sign in to comment.