Hi,
I want to include HTML as content into a template.
This is my code so far:
sub show {
my $self = shift;
my $html = '<b>test</b>';
my $dom = Mojo::DOM->new($html);
my $content = $dom->at('div.ocr_page')->to_string;
$self->stash->{hocr} = $content;
$self->render();
}
And the template:
% layout 'default';
<%= $hocr %>
But this renders the HTML as text, i.e. the markup is displayed.
Solution?
TIA
Helmut Wollmersdorfer
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.