bagder: curl-www/feedback feedback.pm,1.2,1.3

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/feedback
In directory labb:/tmp/cvs-serv14385

Modified Files:
	feedback.pm 
Log Message:
Dan F's regex fixes for the spam posts


Index: feedback.pm
===================================================================
RCS file: /cvsroot/curl/curl-www/feedback/feedback.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- feedback.pm	25 May 2005 11:19:37 -0000	1.2
+++ feedback.pm	20 Jan 2006 22:16:10 -0000	1.3
@@ -21,11 +21,14 @@
         # insert <p> to make new paragraphs
         $idea =~ s/\r\n\r\n/\r\n<p>\r\n/g;
 
+        # we add rel=\"nofollow\" to stop Google from following links:
+        # http://googleblog.blogspot.com/2005/01/preventing-comment-spam.html
+
         # replace http://-specified URLs
-        $idea =~ s/(http:\/\/[^ \r\n]*)/<a href=\"$1\">$1<\/a>/gi;
+        $idea =~ s/(http:\/\/[^ \t\r\n\"]*)/<a href=\"$1\" rel=\"nofollow\">$1<\/a>/gi;
 
         # replace www.-specified sites
-        $idea =~ s/([^\/]|^)(www.[^ \r\n]*)/$1<a href=\"http:\/\/$2\">$2<\/a>/g;
+        $idea =~ s/([^\/]|^)(www.[^ \t\r\n\"]*)/$1<a href=\"http:\/\/$2\" rel=\"nofollow\">$2<\/a>/g;
 
         # replace blabla@blabla mailtos
         $idea =~ s/([ \t\n]|^)(([^ \r\n]+)\@([^ \r\n]+))/$1<a href=\"mailto:$2\">$2<\/a>/g;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.