#!@PERL@

use strict;
use warnings;
use CGI qw(:standard -utf8);
use POSIX qw(strftime);
use HTML::TagFilter;
use Encode qw(encode);

use lib '@CGIBINDIR@';
use civs_common;
use election;

my $control_key = param('key');

CheckElectionID;
CheckControlKey($control_key);

my $home = '@CIVSDATADIR@';

undef $/;

print CGI::header(-charset => 'utf-8');

my $description = &Filter(scalar param('description'));

$edata{'description'} = encode('utf-8', $description);

print "OK";

Log("Poll description edited: " . $election_id);

exit 0;
