Bug fix for html/fillinform


I found a bug in html/fillinform. This form will not get filled

<select name="test">
<option value="1">one</option>
<option value="2">two</option>

The reason is that the code for processing <option value="*"> has a
bug. Here is the fix:

Change line 131 (tag.attr['selected'] = true) to:

    chk = true

Change line 133 (tag.attr.delete('selected')) to:

    chk = false

Also, regarding line 115:

    option_tag.attr = (tag.attr ? tag.attr : {})

I think that this would better be written as:

    option_tag.attr = tag.attr || {}

P.S. The webpage at
http://www.0xfa.com/~ikechin/ruby/html-fillinform-0.22/fillinform.rd writes
your e-mail address incorrectly as ikechin@Oxfa.com
("Oxfa" != "0xfa").