For MediaWiki (recent comments | status changes | tags | authors | states | release notes)
Index: trunk/extensions/ParserFunctions/ParserFunctions.php =================================================================== --- trunk/extensions/ParserFunctions/ParserFunctions.php (revision 41880) +++ trunk/extensions/ParserFunctions/ParserFunctions.php (revision 41881) @@ -133,7 +133,7 @@ } function iferror( &$parser, $test = '', $then = '', $else = false ) { - if ( preg_match( '/<(strong|span|p|div)\s[^>]*?class="error"/', $test ) ) { + if ( preg_match( '/<(?:strong|span|p|div)\s(?:[^\s>]*\s+)*?class="(?:[^"\s>]*\s+)*?error(?:\s[^">]*)?"/', $test ) ) { return $then; } elseif ( $else === false ) { return $test;