Index: trunk/extensions/SpamBlacklist/SpamBlacklist_body.php |
— | — | @@ -145,6 +145,10 @@ |
146 | 146 | $regex =& $this->getRegex(); |
147 | 147 | |
148 | 148 | if ( $regex && $regex[0] == '/' ) { |
| 149 | + # Strip SGML comments out of the markup |
| 150 | + # This was being used to circumvent the filter (see bug 5185) |
| 151 | + $text = preg_replace( '/<\!--.*-->/', '', $text ); |
| 152 | + |
149 | 153 | # Do the match |
150 | 154 | wfDebug( "Checking text against regex: $regex\n" ); |
151 | 155 | if ( preg_match( $regex, $text, $matches ) ) { |