Index: comment.php
===================================================================
--- comment.php	(revision 12676)
+++ comment.php	(working copy)
@@ -45,7 +45,7 @@
 	if ( 1 == get_option('comment_moderation') )
 		return false; // If moderation is set to manual
 
-	if ( get_option('comment_max_links') && preg_match_all("/<[Aa][^>]*[Hh][Rr][Ee][Ff]=['\"]([^\"'>]+)[^>]*>/", apply_filters('comment_text',$comment), $out) >= get_option('comment_max_links') )
+	if ( get_option('comment_max_links') && preg_match_all("/<a[^>]+href=\\\\?['\"]([^\"'>]+?)\\\\?['\"][^>]*>/i", apply_filters('comment_text',$comment), $out) >= get_option('comment_max_links') )
 		return false; // Check # of external links
 
 	$mod_keys = trim(get_option('moderation_keys'));
