# Add the votes column to the list of columns to be displayed
# in the bug list if the user is searching for bugs with a certain
# number of votes and the votes column is not already on the list.
-push(@displaycolumns, 'votes')
- if $::FORM{'votes'} && !grep($_ eq 'votes', @displaycolumns);
+
+# Some versions of perl will taint 'votes' if this is done as a single
+# statement, because $::FORM{'votes'} is tainted at this point
+if (trim($::FORM{'votes'}) && !grep($_ eq 'votes', @displaycolumns)) {
+ push(@displaycolumns, 'votes');
+}
################################################################################