Skip to content

Commit 56a9c76

Browse files
author
Till Brehm
committed
Replace Windows line breaks with Unix line breaks in custom mail filters.
1 parent e2a219e commit 56a9c76

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/plugins-available/maildeliver_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function update($event_name, $data) {
132132

133133
// Custom filters
134134
if($data["new"]["custom_mailfilter"] == 'NULL') $data["new"]["custom_mailfilter"] = '';
135-
$tpl->setVar('custom_mailfilter', $data["new"]["custom_mailfilter"]);
135+
$tpl->setVar('custom_mailfilter', str_replace("\r\n","\n",$data["new"]["custom_mailfilter"]));
136136

137137
// Move junk
138138
$tpl->setVar('move_junk', $data["new"]["move_junk"]);

server/plugins-available/maildrop_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ function update($event_name, $data) {
211211
$mailfilter_content .= file_get_contents($conf["rootpath"].'/conf/mailfilter_move_junk.master')."\n";
212212
}
213213
}
214-
$mailfilter_content .= $data["new"]["custom_mailfilter"];
214+
$mailfilter_content .= str_replace("\r\n","\n",$data["new"]["custom_mailfilter"]);
215215

216216
// Replace windows linebreaks in mailfilter file
217217
$mailfilter_content = str_replace("\r\n", "\n", $mailfilter_content);

0 commit comments

Comments
 (0)