diff options
| author | Fabian Lemm <f.lemm@bebeyond.de> | 2023-05-08 14:31:13 +0200 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2023-05-12 17:35:23 +0200 |
| commit | 93fa6785ad0c4f51f44d0e5a9055575e4337742b (patch) | |
| tree | d69e1bc00ea7148583fc4ad021bf2abf9b3ae397 | |
| parent | 2ff5c635efdcdac816422cf97d04c92820e3f0af (diff) | |
| download | adodb-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
| -rw-r--r-- | tohtml.inc.php | 5 |
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 { |
