[pmwiki-users] PmWiki 2.2.4 Input markup changes brakes forms

Hans design5 at softflow.co.uk
Sun Aug 2 11:33:23 CDT 2009


In this release or one of the previous ones (i can't find the info in
the change log) the  forms.php script changed and now it brakes some
forms which use array syntax as input names, for instance radio buttons
with name=but[] in (:input:) markup:

(:input radio but[] value1:)
(:input radio but[] value2:)
(:input radio but[] value3:)

such markup was rendered fine, with name=but[], but not any longer,
because function InputToHTML in forms.php strips the [] characters.

Note that on form submission an array is passed to $_POST:
selecting the second button for instance will give a $_POST item
 of    [but] => array( [2] => 'value2')
which is very useful for form construction and subsequent submission
handling.

Can the [] characters be included in line 103, i.e.

$opt['name'] = preg_replace('/[^-A-Za-z0-9:_.\[\]]+/', '_', $opt['name']);


Thanks!

  ~Hans




More information about the pmwiki-users mailing list