Item10978: Select element created with select+values does not handle empty select string
Priority : Normal
Current State: Closed
Released In: 1.1.4
Target Release: patch
Applies To : Engine
Component:
Branches:
If the select value of the
select+values
part is an empty string (perhaps because of a
SEARCH
), the select HTML element shows the value part.
With this data table:
Name
Type
Size
Values
Tooltip message
Attributes
wordType
select+values
1
,=1,Two=2
Type of word
You will get this select element:
=1
Two
Instead of
<option value="=1" class="foswikiOption">=1</option>
the option should be
<option value="1" class="foswikiOption"></option>
The parsing of the
select+values
is done in
Form::Select
, line 58. The current regex is:
if ( $val =~ /^(.*?[^\\])=(.*)$/ ) {
$str = TAINT($1);
but I believe it should be
if ( $val =~ /^(.*[^\\])*=(.*)$/ ) {
$str = TAINT($1) || '';
--
ArthurClemens - 17 Jul 2011
Updated unit test and committed.
--
ArthurClemens - 17 Jul 2011