$badword = str_replace('\*', '([a-zA-Z0-9_]{1})', preg_quote($mybb->input['badword'], "#"));
| $badword = trim($mybb->input['badword']);
if($mybb->get_input('regex', MyBB::INPUT_INT)) { // Check validity of defined regular expression if((@preg_match('#'.$badword.'#is', null) === false)) { $errors[] = $lang->error_invalid_regex; } } else { if(!is_object($parser)) { require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser; } $badword = $parser->generate_regex($badword); }
|
if(strlen($mybb->input['badword']) == strlen($mybb->input['replacement']) && preg_match("#(^|\W)".$badword."(\W|$)#i", $mybb->input['replacement']))
| if(@preg_match('#'.$badword.'#is', $mybb->input['replacement']))
|