93 |
sub popup { my $self = shift; $self->popup_dropdown('popup', @_); } |
sub popup { my $self = shift; $self->popup_dropdown('popup', @_); } |
94 |
sub dropdown { my $self = shift; $self->popup_dropdown('dropdown', @_); } |
sub dropdown { my $self = shift; $self->popup_dropdown('dropdown', @_); } |
95 |
|
|
96 |
our $re_html = qr{<(?:!--.+?--|(\w+).+?/\1|[^>]+/)>}s; # relaxed html check for one semi-valid tag |
our $re_html = qr{<(?:!--.+?--|(\w+).+?/\1|[^>]+/?)>}s; # relaxed html check for one semi-valid tag |
97 |
|
|
98 |
sub popup_dropdown { |
sub popup_dropdown { |
99 |
my ( $self, $type, $name, $content, $full ) = @_; |
my ( $self, $type, $name, $content, $full ) = @_; |
679 |
qq|<input name="$name" value="$value" type="checkbox"$checked>|; |
qq|<input name="$name" value="$value" type="checkbox"$checked>|; |
680 |
} |
} |
681 |
|
|
682 |
|
=head2 strip |
683 |
|
|
684 |
|
Strip whitespace around content |
685 |
|
|
686 |
|
my $stripped = strip(' no more whitespace around this '); |
687 |
|
|
688 |
|
=cut |
689 |
|
|
690 |
|
sub strip { |
691 |
|
my $t = shift; |
692 |
|
$t =~ s{^\s+}{}gs; |
693 |
|
$t =~ s{>\s+<}{><}gs; |
694 |
|
$t =~ s{\s+$}{}gs; |
695 |
|
return $t; |
696 |
|
} |
697 |
|
|
698 |
1; |
1; |