aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-06 14:18:29 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-03-06 14:18:29 +0000
commit7c8e6dfa580ce18f905ffe4e08e4b3e55341024e (patch)
treefadf3dd441452cabbf2d864973d657da20f5f3cc /utils
parent0b07857f7a50c952480f6e1b550d1ff295012abf (diff)
downloadrspamd-7c8e6dfa580ce18f905ffe4e08e4b3e55341024e.tar.gz
rspamd-7c8e6dfa580ce18f905ffe4e08e4b3e55341024e.zip
[Fix] Fix CGP escaping
Diffstat (limited to 'utils')
-rw-r--r--utils/cgp_rspamd.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/cgp_rspamd.pl b/utils/cgp_rspamd.pl
index 90fa43f90..f387dd877 100644
--- a/utils/cgp_rspamd.pl
+++ b/utils/cgp_rspamd.pl
@@ -41,9 +41,10 @@ $| = 1;
sub cgp_string {
my ($in) = @_;
- $in =~ s/\"/\\"/;
- $in =~ s/\n/\\n/;
- $in =~ s/\r/\\r/;
+ $in =~ s/\"/\\"/g;
+ $in =~ s/\n/\\n/gms;
+ $in =~ s/\r/\\r/mgs;
+ $in =~ s/\t/ /g;
return "\"$in\"";
}