Skip to content

Commit

Permalink
fix handling of parameters with multiple values in Mojolicious::Plugi…
Browse files Browse the repository at this point in the history
…n::TagHelpers
  • Loading branch information
kraih committed Sep 2, 2015
1 parent 1c448e3 commit d7a308d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Changes
@@ -1,6 +1,8 @@

6.18 2015-08-31
6.18 2015-09-02
- Improved portability of slurp function in Mojo::Util.
- Fixed handling of parameters with multiple values in
Mojolicious::Plugin::TagHelpers.
- Fixed Makefile.PL to be compliant with version 2 of the CPAN distribution
metadata specification. (Grinnz)

Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/TagHelpers.pm
Expand Up @@ -80,7 +80,7 @@ sub _input {
}

# Others
else { $attrs{value} = $values[0] }
else { $attrs{value} = $values[-1] }
}

return _validation($c, $name, 'input', name => $name, %attrs);
Expand Down
2 changes: 1 addition & 1 deletion t/mojolicious/tag_helper_lite_app.t
Expand Up @@ -254,7 +254,7 @@ $t->get_ok('/multibox?foo=two&foo=one')->status_is(200)->content_is(<<EOF);
EOF

# Advanced form with values
$t->get_ok('/form/lala?a=2&b=0&c=2&d=3&escaped=1%22+%222')->status_is(200)
$t->get_ok('/form/lala?a=3&a=2&b=0&c=2&d=3&escaped=1%22+%222')->status_is(200)
->content_is(<<EOF);
<form action="/links" method="post">
<input name="foo">
Expand Down

0 comments on commit d7a308d

Please sign in to comment.