Skip to content
Snippets Groups Projects
Commit 56a9c765 authored by Till Brehm's avatar Till Brehm
Browse files

Replace Windows line breaks with Unix line breaks in custom mail filters.

parent e2a219e2
No related branches found
No related tags found
No related merge requests found
......@@ -132,7 +132,7 @@ class maildeliver_plugin {
// Custom filters
if($data["new"]["custom_mailfilter"] == 'NULL') $data["new"]["custom_mailfilter"] = '';
$tpl->setVar('custom_mailfilter', $data["new"]["custom_mailfilter"]);
$tpl->setVar('custom_mailfilter', str_replace("\r\n","\n",$data["new"]["custom_mailfilter"]));
// Move junk
$tpl->setVar('move_junk', $data["new"]["move_junk"]);
......
......@@ -211,7 +211,7 @@ class maildrop_plugin {
$mailfilter_content .= file_get_contents($conf["rootpath"].'/conf/mailfilter_move_junk.master')."\n";
}
}
$mailfilter_content .= $data["new"]["custom_mailfilter"];
$mailfilter_content .= str_replace("\r\n","\n",$data["new"]["custom_mailfilter"]);
// Replace windows linebreaks in mailfilter file
$mailfilter_content = str_replace("\r\n", "\n", $mailfilter_content);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment