summaryrefslogtreecommitdiff
path: root/tohtml.inc.php
diff options
context:
space:
mode:
authorFabian Lemm <f.lemm@bebeyond.de>2023-05-08 14:31:13 +0200
committerDamien Regad <dregad@mantisbt.org>2023-05-12 17:35:23 +0200
commit93fa6785ad0c4f51f44d0e5a9055575e4337742b (patch)
treed69e1bc00ea7148583fc4ad021bf2abf9b3ae397 /tohtml.inc.php
parent2ff5c635efdcdac816422cf97d04c92820e3f0af (diff)
downloadadodb-93fa6785ad0c4f51f44d0e5a9055575e4337742b.tar.gz
adodb-93fa6785ad0c4f51f44d0e5a9055575e4337742b.tar.bz2
adodb-93fa6785ad0c4f51f44d0e5a9055575e4337742b.zip
Restore rs2html() $htmlspecialchars param behavior
Regression introduced by bda6e1ea4271d0818dc22213e6a37269eea427b4. 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
Diffstat (limited to 'tohtml.inc.php')
-rw-r--r--tohtml.inc.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/tohtml.inc.php b/tohtml.inc.php
index a36fdf6b..6e9a6286 100644
--- a/tohtml.inc.php
+++ b/tohtml.inc.php
@@ -141,7 +141,10 @@ GLOBAL $gSQLMaxRows,$gSQLBlockRows,$ADODB_ROUND;
default:
if ($v) {
- $v = htmlspecialchars(stripslashes(trim($v)));
+ $v = trim($v);
+ if ($htmlspecialchars) {
+ $v = htmlspecialchars($v);
+ }
} elseif ($v === null) {
$v = '(NULL)';
} else {