From dcab4c1b510920fdcf3d6ce321a58ca0993e8fc4 Mon Sep 17 00:00:00 2001 From: henoheno Date: Fri, 17 Aug 2007 23:34:44 +0900 Subject: [PATCH 1/1] spam_uri_pickup_preprocess(): Simplify --- spam/spam_pickup.php | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/spam/spam_pickup.php b/spam/spam_pickup.php index e920158..1ce25bb 100644 --- a/spam/spam_pickup.php +++ b/spam/spam_pickup.php @@ -1,5 +1,5 @@ http://nasty.example.org/?refer=victim.example.org and original - $string = preg_replace( - '#h?ttp://' . - '(' . - 'big5.51job.com' . '|' . - 'big5.china.com' . '|' . - 'big5.xinhuanet.com' . '|' . - ')' . - '/gate/big5' . - '/([a-z0-9.%_-]+\.[a-z0-9.%_-]+)' . - '#i', // nasty.example.org - 'http://$2/?refer=$1 $0', // Preserve $0 or remove? + '([a-z0-9.%_-]+\.[a-z0-9.%_-]+)' . // nasty.example.org + '#i', + 'http://$2/?refer=$1 $0', // Preserve $0 or remove? $string ); -- 2.11.0