my $self = shift;
my ( $controller, $c ) = @_;
- my $stash_key = $controller->config->{'serialize'}->{'stash_key'} || 'rest';
+ my $stash_key = (
+ $controller->config->{'serialize'} ?
+ $controller->config->{'serialize'}->{'stash_key'} :
+ $controller->config->{'stash_key'}
+ ) || 'rest';
my $app = $c->config->{'name'} || '';
my $output = "<html>";
$output .= "<title>" . $app . "</title>";
my $finder = URI::Find->new(
sub {
my($uri, $orig_uri) = @_;
- return qq|<a href="$uri">$orig_uri</a>|;
+ my $newuri;
+ if ($uri =~ /\?/) {
+ $newuri = $uri . "&content-type=text/html";
+ } else {
+ $newuri = $uri . "?content-type=text/html";
+ }
+ return qq|<a href="$newuri">$orig_uri</a>|;
});
$finder->find(\$text);
$output .= $text;