Add Series from cgi fails.

Arthur Murray amurrayfsf at gmail.com
Thu Jun 27 19:18:45 EDT 2013


Using "Add Series" from the get_iplayer.cgi on a prog name with a
question mark in it ("Who Were the Greeks?") fills in the "search0"
field of the pvr file with the question mark and therefore does not
match. (search0 ^Who Were the Greeks?$).  If the question mark is
escaped it will match (search0 ^Who Were the Greeks\?$).  What is the
correct place to correct this, in the cgi, or in get_iplayer and
specifically where?

(Encoding the question mark to ? doesn't work, only escaping it does.)

# from cgi
# Add Series
$links .= label( {
        -id=>'nowrap',
        -class=>'search pointer_noul',
        -title=>"Add Series '$prog{$pid}->{name}' to PVR",
        -onClick=>"BackupFormVars(form);
form.NEXTPAGE.value='pvr_add';
form.SEARCH.value='".encode_entities("^$prog{$pid}->{name}\$")."'; ...


Sample of ugly fixing in cgi:

 my $encoded = encode_entities("^$prog{$pid}->{name}\$");
 $encoded =~ s/\?/\\\\\\\?/;

... form.SEARCH.value='$encoded';  ...



More information about the get_iplayer mailing list