Unverified Commit 2ab94e5e authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #802 from racke/pr/xml-create-list-undefined-description by racke

Prevent warning caused by empty description in XML list definition file.
parents fe59ff55 41d8fdf2
......@@ -183,15 +183,14 @@ sub _twist {
$lock_fh->close;
## Creation of the info file
# remove DOS linefeeds (^M) that cause problems with Outlook 98, AOL, and
# EIMS:
$param->{'description'} =~ s/\r\n|\r/\n/g;
## info file creation.
my $fh;
unless (open $fh, '>', "$list_dir/info") {
$log->syslog('err', 'Impossible to create %s/info: %m', $list_dir);
} elsif (defined $param->{'description'}) {
# remove DOS linefeeds (^M) that cause problems with Outlook 98, AOL, and
# EIMS:
$param->{'description'} =~ s/\r\n|\r/\n/g;
Encode::from_to($param->{'description'},
'utf8', $Conf::Conf{'filesystem_encoding'});
print $fh $param->{'description'};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment