[pmwiki-devel] searchbox bug?

Hans design5 at softflow.co.uk
Sat Nov 25 05:33:39 CST 2006


I noticed that the wiki searchbox generates a spurious hidden input
form, when parameters are added to the markup:

<input type='hidden' name='#' value='Array' />

It seems to be generated in the SearchBox function (scripts/pagelist.php)
from this loop:

  foreach($opt as $k => $v) {
    if ($v == '') continue;
    if ($k == 'q' || $k == 'label' || $k == 'value' || $k == 'size') continue;
    $k = str_replace("'", "&#039;", $k);
    $v = str_replace("'", "&#039;", $v);
    $out .= "<input type='hidden' name='$k' value='$v' />";
  }

but I don't know how to fix it.
I use a modified version of the function, which includes some
javascript for focussing, and noticed this behaviour there first, but
it occurs also in the default pmwiki searchbox function, when
additional parameters are enclosed in the markup.

-- 
Best regards,
 Hans
 




More information about the pmwiki-devel mailing list