~ubuntu-branches/ubuntu/raring/libhtml-form-perl/raring

« back to all changes in this revision

Viewing changes to lib/HTML/Form.pm

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini, Ansgar Burchardt, Salvatore Bonaccorso, Alessandro Ghedini
  • Date: 2012-02-19 19:53:17 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120219195317-gnw6p9756qkh2e30
Tags: 6.01-1
* Team upload

[ Ansgar Burchardt ]
* debian/control: Convert Vcs-* fields to Git.

[ Salvatore Bonaccorso ]
* debian/copyright: Replace DEP5 Format-Specification URL from
  svn.debian.org to anonscm.debian.org URL.

[ Alessandro Ghedini ]
* New upstream release
* Bump debhelper compat level to 8
* Bump Standards-Version to 3.9.2
* One sorted dep per line
* Add fix-typos.patch (fixes spelling-error-in-manpage)

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
use Encode ();
7
7
 
8
8
use vars qw($VERSION);
9
 
$VERSION = "6.00";
 
9
$VERSION = "6.01";
10
10
 
11
11
my %form_tags = map {$_ => 1} qw(input textarea button select option);
12
12
 
74
74
(or US-ASCII).
75
75
 
76
76
By default HTML::Form assumes that the original document was UTF-8 encoded and
77
 
thus encode forms that don't specify an explict I<accept-charset> as UTF-8.
 
77
thus encode forms that don't specify an explicit I<accept-charset> as UTF-8.
78
78
The charset assumed can be overridden by providing the C<charset> option to
79
 
parse().  It's a good idea to be explict about this parameter as well, thus
 
79
parse().  It's a good idea to be explicit about this parameter as well, thus
80
80
the recommended simplest invocation becomes:
81
81
 
82
82
    my @forms = HTML::Form->parse(
194
194
                my($tag, $attr) = @$t;
195
195
                last if $tag eq "/form";
196
196
 
197
 
                # if we are inside a label tag, then keep
198
 
                # appending any text to the current label
199
 
                if(defined $current_label) {
200
 
                    $current_label = join " ",
201
 
                        grep { defined and length }
202
 
                        $current_label,
203
 
                        $p->get_phrase;
 
197
                if ($tag ne 'textarea') {
 
198
                    # if we are inside a label tag, then keep
 
199
                    # appending any text to the current label
 
200
                    if(defined $current_label) {
 
201
                        $current_label = join " ",
 
202
                            grep { defined and length }
 
203
                            $current_label,
 
204
                            $p->get_phrase;
 
205
                    }
204
206
                }
205
207
 
206
208
                if ($tag eq "input") {