Skip to content

Commit

Permalink
more tag helper examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 6, 2014
1 parent 46edc0f commit 17e2d5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

5.58 2014-11-05
5.58 2014-11-06
- Improved error handling in Mojo::IOLoop::Client.

5.57 2014-11-02
Expand Down
9 changes: 5 additions & 4 deletions lib/Mojolicious/Plugin/TagHelpers.pm
Expand Up @@ -686,12 +686,13 @@ HTML/XML tag generator.
Very useful for reuse in more specific tag helpers.
$c->tag('div');
$c->tag('div', id => 'foo');
$c->tag(div => sub { 'Content' });
my $output = $c->tag('div');
my $output = $c->tag('div', id => 'foo');
my $output = $c->tag(div => 'Content that will be escaped');
my $output = $c->tag(div => sub { 'Content that will not be escaped' });
Results are automatically wrapped in L<Mojo::ByteStream> objects to prevent
accidental double escaping.
accidental double escaping in C<ep> templates.
=head2 tag_with_error
Expand Down

0 comments on commit 17e2d5f

Please sign in to comment.