20 |
/; |
/; |
21 |
# FormValidator |
# FormValidator |
22 |
|
|
23 |
our $VERSION = '0.36-dev'; |
use Encode qw/is_utf8 decode/; |
24 |
|
|
25 |
|
our $VERSION = '0.37-dev'; |
26 |
|
|
27 |
# |
# |
28 |
# Configure the application |
# Configure the application |
115 |
# Forward to View unless response body is already defined |
# Forward to View unless response body is already defined |
116 |
$c->forward('View::TT'); |
$c->forward('View::TT'); |
117 |
|
|
118 |
$c->fillform( $c->req->params ); |
# oh, turn utf8 flag for all parametars (why do I need to do this?) |
119 |
|
my $utf8_params; |
120 |
|
map { |
121 |
|
$utf8_params->{$_} = decode('UTF-8', $c->request->params->{$_}); |
122 |
|
} keys %{ $c->request->params }; |
123 |
|
|
124 |
|
# and fill-in form with new UTF-8 encoded params (to prevent double-escape of UTF-8) |
125 |
|
$c->fillform( $utf8_params ); |
126 |
|
|
127 |
$c->response->{body} =~ s#\Qnew Ajax.Autocompleter(\E#new WebPAC.Suggest(#gs; |
$c->response->{body} =~ s#\Qnew Ajax.Autocompleter(\E#new WebPAC.Suggest(#gs; |
128 |
$c->response->{body} =~ s#\Qnew Ajax.Updater(\E#new WebPAC.Updater(#gs; |
$c->response->{body} =~ s#\Qnew Ajax.Updater(\E#new WebPAC.Updater(#gs; |