- # blogspam API does not have a field for author url, so put it in
- # the content to be checked.
- if (exists $params{url}) {
- $params{content}.="\n".$params{url};
- }
-
- my $res = $client->send_request('testComment', {
- ip => $ENV{REMOTE_ADDR},
- comment => $params{content},
- subject => defined $params{subject} ? $params{subject} : "",
- name => defined $params{author} ? $params{author} : "",
+ my %req=(
+ ip => $session->remote_addr(),
+ comment => encode_utf8(defined $params{diff} ? $params{diff} : $params{content}),
+ subject => encode_utf8(defined $params{subject} ? $params{subject} : ""),
+ name => encode_utf8(defined $params{author} ? $params{author} : ""),
+ link => encode_utf8(exists $params{url} ? $params{url} : ""),