[svn] r6136: nemerle/trunk/snippets/blogComments.n
malekith
svnadmin at nemerle.org
Wed Feb 22 08:05:41 CET 2006
Log:
Reject BBCode links too.
Author: malekith
Date: Wed Feb 22 08:05:40 2006
New Revision: 6136
Modified:
nemerle/trunk/snippets/blogComments.n
Modified: nemerle/trunk/snippets/blogComments.n
==============================================================================
--- nemerle/trunk/snippets/blogComments.n (original)
+++ nemerle/trunk/snippets/blogComments.n Wed Feb 22 08:05:40 2006
@@ -159,7 +159,10 @@
def body = quote (get_with_default (post, "body"));
def ip = getenv ("REMOTE_ADDR");
def nick = quote (get_with_default (post, "nick"));
- if (body.IndexOf ("href=") != -1) {
+ def lbody = body.ToLower ();
+ if (lbody.IndexOf ("href=") != -1 ||
+ lbody.IndexOf ("[url]http") != -1 ||
+ lbody.IndexOf ("[url=") != -1) {
comment_rejected = true;
f.Close ();
} else {
More information about the svn
mailing list