The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HTML::Template::Compiled::Plugin::HTML2 - Do not escape all HTML entities

VERSION

version 0.02

SYNOPSIS

    my $template = '<%= test ESCAPE=HTML_WITHOUT_NBSP %>';
    my $text     = 'hello>';

    my $tmpl = HTML::Template::Compiled->new(
        scalarref => \$template,
        plugin    => [ 'HTML::Template::Compiled::Plugin::HTML2' ],
    );

    $tmpl->param( test => $text );
    my $output = $tmpl->output;

    is $output, 'hello&gt;', '> => &gt;';

    my $template = '<%= test ESCAPE=HTML_WITHOUT_NBSP %>';
    my $text     = '&nbsp; hello<br />';

    my $tmpl = HTML::Template::Compiled->new(
        scalarref => \$template,
        plugin    => [ 'HTML::Template::Compiled::Plugin::HTML2' ],
    );

    $tmpl->param( test => $text );
    my $output = $tmpl->output;

    is $output, '&nbsp; hello<br />', 'test';

DESCRIPTION

AUTHOR

Renee Baecker <reneeb@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by Renee Baecker.

This is free software, licensed under:

  The Artistic License 2.0 (GPL Compatible)