From 7c8e6dfa580ce18f905ffe4e08e4b3e55341024e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 6 Mar 2017 14:18:29 +0000 Subject: [PATCH] [Fix] Fix CGP escaping --- utils/cgp_rspamd.pl | 7 ++++--- 1 file 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\""; } -- 2.39.5