id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 8986 Regular expression syntax errors - missing preg pattern delimiters ridgerunner "I am a regex guy looking into maybe using wp. While scanning your wp code (specifically the preg_*() calls), I found three typo's (i.e. regex pattern strings having unintended/missing delimiters) that you may wish to clean up. All three regexs are simple character classes that are not behaving as intended, because the opening and closing square brackets are unintentionally being stripped out as the pattern delimiters (i.e. the as-written preg_replace() pattern: '[class]' should instead be written as: '/[class]/', or '#[class]#', or '{[class]}', etc.). {{{ file: wordpress-2.7\wp-includes\class-phpmailer.php line: 1412 current: $encoded = preg_replace(""[\r\n]"", '', $str); fixed: $encoded = preg_replace(""/[\r\n]/"", '', $str); file: wordpress-2.7\wp-includes\formatting.php line: 1773 current: $safe_tag = strtolower( preg_replace('[^a-zA-Z_:]', '', $tag_name) ); fixed: $safe_tag = strtolower( preg_replace('/[^a-zA-Z_:]/', '', $tag_name) ); file: wordpress-2.7\wp-includes\post-template.php line: 610 current: $r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']); fixed: $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']); }}} (Note: I hope I'm using the right bug posting protocol - please forgive me if I'm not - its my first time posting anything over here in wp-land. Also, I have not analyzed the code to evaluate the effects of any of these typos.)" defect (bug) closed normal 2.7.1 General 2.7 normal fixed regex preg has-patch