diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2011-04-12 23:33:31 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2011-04-12 23:33:31 -0400 |
commit | e2b2a4831be5f682a5a59b642fde1ba1f1caa308 (patch) | |
tree | d0f923068852fb3fc959ffbf70ce263782eb7603 /examples | |
parent | ed8f45d6eb21e5a931d55235708bcc73a2191771 (diff) |
Match form field types exactly
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/data/scripts/formfiller.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/data/scripts/formfiller.sh b/examples/data/scripts/formfiller.sh index 3dc9dc4..435a114 100755 --- a/examples/data/scripts/formfiller.sh +++ b/examples/data/scripts/formfiller.sh @@ -66,15 +66,15 @@ ParseFields () field = $0 sub ( /[^:]*:/, "", field ) - if ( parts[2] ~ /(text|password|search)/ ) + if ( parts[2] ~ /^(text|password|search)$/ ) printf( "js uzbl.formfiller.insert(\"%s\",\"%s\",\"%s\",0);\n", parts[1], parts[2], field ) - else if ( parts[2] ~ /(checkbox|radio)/ ) + else if ( parts[2] ~ /^(checkbox|radio)$/ ) printf( "js uzbl.formfiller.insert(\"%s\",\"%s\",\"%s\",%s);\n", parts[1], parts[2], parts[3], field ) - else if ( parts[2] == "textarea" ) { + else if ( parts[2] ~ /^textarea$/ ) { field = "" while (getline) { if ( /^%/ ) break |