Skip to content

Commit

Permalink
better escaping test and example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 18, 2012
1 parent 7867084 commit 97306d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Template.pm
Expand Up @@ -527,10 +527,10 @@ Encoding used for template files.
=head2 C<escape>
my $code = $mt->escape;
$mt = $mt->escape('Mojo::Util::html_escape(@_)');
$mt = $mt->escape('Mojo::Util::html_escape("$_[0]")');
Perl code used to escape the results of expressions, defaults to
C<Mojo::Util::html_escape("$_[0]")>. Note that this code should not contain
C<Mojo::Util::xml_escape("$_[0]")>. Note that this code should not contain
newline characters, or line numbers in error messages might end up being
wrong.
Expand Down
2 changes: 1 addition & 1 deletion t/mojolicious/twinkle_lite_app.t
Expand Up @@ -26,7 +26,7 @@ my $twinkle = {
expression_mark => '*',
line_start => '.',
namespace => 'TwinkleSandBoxTest',
escape => 'Mojo::Util::html_escape(@_)',
escape => 'Mojo::Util::html_escape("$_[0]")',
prepend => 'my $prepended = $self->config("foo");',
tag_end => '**',
tag_start => '**',
Expand Down

0 comments on commit 97306d3

Please sign in to comment.