Skip to content

Commit

Permalink
Make sure both prefix and suffix of spaces are removed
Browse files Browse the repository at this point in the history
Previously after parsing and reassembling, searches like "... AND ( id >
0 )" were changed to "... AND (  id > 0 )", note that an additional
whitespace was added ahead of "id > 0". This commit fixes this issue.
  • Loading branch information
sunnavy committed Nov 16, 2023
1 parent 2be1b0f commit 863714d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/RT/Interface/Web/QueryBuilder/Tree.pm
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ sub __LinearizeTree {

$str .= $key ." ". $op . " " . $value;
}
$str =~ s/^\s+|\s+$//;
$str =~ s/^\s+//;
$str =~ s/\s+$//;

push @$list, {
NODE => $node,
Expand Down

0 comments on commit 863714d

Please sign in to comment.