From: henoheno Date: Fri, 17 Aug 2007 14:34:44 +0000 (+0900) Subject: spam_uri_pickup_preprocess(): Simplify X-Git-Url: http://git.osdn.net/view?p=pukiwiki%2Fpukiwiki_sandbox.git;a=commitdiff_plain;h=dcab4c1b510920fdcf3d6ce321a58ca0993e8fc4;hp=2ef33c323ea6bc02c08f84d8e36b608d2ac7f5e9 spam_uri_pickup_preprocess(): Simplify --- 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 );