Skip to content

Commit

Permalink
use the decoded form contents internally
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Feb 24, 2012
1 parent d238610 commit be4dabf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Rubric/WebApp.pm
Expand Up @@ -992,11 +992,13 @@ sub _post_form_contents {
for qw(entryid uri title description tags body);

for (qw(uri title description body tags)) {
my $decoded;
my $ok = eval {
decode_utf8($form{$_}, Encode::FB_CROAK | Encode::LEAVE_SRC);
$decoded = decode_utf8($form{$_}, Encode::FB_CROAK | Encode::LEAVE_SRC);
1;
};
$error{$_} = "Invalid UTF-8 characters in $_." unless $ok;
$form{$_} = $decoded if $ok;
}

eval { $form{uri} = URI->new($form{uri})->canonical; };
Expand Down

0 comments on commit be4dabf

Please sign in to comment.