cvs: php-bugs-web /rss search.php

From: Date: Sun, 07 Jan 2007 08:17:40 +0000
Subject: cvs: php-bugs-web /rss search.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-33713@lists.php.net to get a copy of this message
bjori Sun Jan 7 08:17:40 2007 UTC Modified files: /php-bugs-web/rss search.php Log: Guess we need to scramble the email addresses here too http://cvs.php.net/viewvc.cgi/php-bugs-web/rss/search.php?r1=1.4&r2=1.5&diff_format=u Index: php-bugs-web/rss/search.php diff -u php-bugs-web/rss/search.php:1.4 php-bugs-web/rss/search.php:1.5 --- php-bugs-web/rss/search.php:1.4 Mon Aug 7 21:23:26 2006 +++ php-bugs-web/rss/search.php Sun Jan 7 08:17:40 2007 @@ -162,7 +162,7 @@ echo ' <description>' . utf8_encode(htmlspecialchars($row['ldesc'])) . "</description>\n"; echo ' <dc:date>' . date('Y-m-d',$row['modified']) . "</dc:date>\n"; echo ' <dc:time>' . date('H:i:s',$row['modified']) . "</dc:time>\n"; - echo ' <dc:creator>' . utf8_encode(htmlspecialchars($row['email'])) . "</dc:creator>\n"; + echo ' <dc:creator>' . utf8_encode(htmlspecialchars(spam_protect($row['email']))) . "</dc:creator>\n"; echo ' <dc:subject>' . utf8_encode(htmlspecialchars($row['bug_type'])) . "</dc:subject>\n"; echo " </item>\n"; if ($i >= MAX_BUGS_RETURN) { @@ -195,3 +195,15 @@ } } +/* Email spam protection */ +function spam_protect($txt) { + $translate = array('@' => ' at ', '.' => ' dot '); + + /* php.net addresses are not protected! */ + if (preg_match('/^(.+)@php\.net/i', $txt)) { + return $txt; + } else { + return strtr($txt, $translate); + } +} +

« previous php.mirrors (#33713) next »