87 |
sub popup { my $self = shift; $self->popup_dropdown('popup', @_); } |
sub popup { my $self = shift; $self->popup_dropdown('popup', @_); } |
88 |
sub dropdown { my $self = shift; $self->popup_dropdown('dropdown', @_); } |
sub dropdown { my $self = shift; $self->popup_dropdown('dropdown', @_); } |
89 |
|
|
90 |
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 |
91 |
|
|
92 |
sub popup_dropdown { |
sub popup_dropdown { |
93 |
my ( $self, $type, $name, $content, $full ) = @_; |
my ( $self, $type, $name, $content, $full ) = @_; |
121 |
$path =~ s!^/!!; |
$path =~ s!^/!!; |
122 |
if ( $path =~ m/\.js$/ ) { |
if ( $path =~ m/\.js$/ ) { |
123 |
$out .= $self->_inline_path( $path ) ? |
$out .= $self->_inline_path( $path ) ? |
124 |
qq|<!-- $path --><script type="text/javascript">\n| . read_file($path) . qq|\n</script>| : |
qq|<script type="text/javascript">\n/* inline $path */\n\n| . read_file($path) . qq|\n</script>| : |
125 |
qq|<script type="text/javascript" src="/$path"></script>|; |
qq|<script type="text/javascript" src="/$path"></script>|; |
126 |
} elsif ( $path =~ m/\.css$/ ) { |
} elsif ( $path =~ m/\.css$/ ) { |
127 |
$out .= $self->_inline_path( $path ) ? |
$out .= $self->_inline_path( $path ) ? |
128 |
qq|<!-- $path --><style type="text/css">\n| . read_file( $path ) . qq|\n</style>| : |
qq|<style type="text/css">\n/* inline $path */\n\n| . read_file( $path ) . qq|\n</style>| : |
129 |
qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|; |
qq|<link type="text/css" rel="stylesheet" href="/$path" media="screen">|; |
130 |
} elsif ( $path =~ m{<.+>}s ) { |
} elsif ( $path =~ m{<.+>}s ) { |
131 |
$out .= $path; |
$out .= $path; |