You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/03/09 23:20:09 UTC
svn commit: r516581 - /spamassassin/trunk/sa-compile.raw
Author: jm
Date: Fri Mar 9 14:20:08 2007
New Revision: 516581
URL: http://svn.apache.org/viewvc?view=rev&rev=516581
Log:
support \033 escapes in sa-compile for __ISO_JP_2022_DELIM
Modified:
spamassassin/trunk/sa-compile.raw
Modified: spamassassin/trunk/sa-compile.raw
URL: http://svn.apache.org/viewvc/spamassassin/trunk/sa-compile.raw?view=diff&rev=516581&r1=516580&r2=516581
==============================================================================
--- spamassassin/trunk/sa-compile.raw (original)
+++ spamassassin/trunk/sa-compile.raw Fri Mar 9 14:20:08 2007
@@ -67,6 +67,7 @@
# testing purposes only
my $fixup_re_test;
+#$fixup_re_test = 1; fixup_re("\\33\$b"); die;
#$fixup_re_test = 1; fixup_re("[link]"); die;
#$fixup_re_test = 1; fixup_re("please do not resend your original message."); die;
@@ -536,10 +537,12 @@
$output .= '"\\""';
}
elsif ($tok eq '\\') {
- $re =~ /\G(.)/gc or die "\\ at end of string!";
+ $re =~ /\G(\d+|.)/gc or die "\\ at end of string!";
my $esc = $1;
if ($esc eq '"') {
$output .= '"\\""';
+ } elsif ($esc =~ /^\d+/) {
+ $output .= '"'.chr(oct($esc)).'"';
} else {
$output .= "\"$esc\"";
}