From 560eacbb44d4e78b5cae3be815eae03ae69de772 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 29 Jan 2009 17:46:31 +0000 Subject: [PATCH] Add missing preg delimiters. Props ridgerunner. fixes #8986 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@10459 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-phpmailer.php | 2 +- wp-includes/formatting.php | 2 +- wp-includes/post-template.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-phpmailer.php b/wp-includes/class-phpmailer.php index a7ad292db8..25e5570a3f 100644 --- a/wp-includes/class-phpmailer.php +++ b/wp-includes/class-phpmailer.php @@ -1409,7 +1409,7 @@ class PHPMailer { */ function EncodeQ ($str, $position = 'text') { /* There should not be any EOL in the string */ - $encoded = preg_replace("[\r\n]", '', $str); + $encoded = preg_replace("/[\r\n]/", '', $str); switch (strtolower($position)) { case 'phrase': diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index ab7b4c176a..166dc5294d 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1960,7 +1960,7 @@ function attribute_escape( $text ) { * @return string */ function tag_escape($tag_name) { - $safe_tag = strtolower( preg_replace('[^a-zA-Z_:]', '', $tag_name) ); + $safe_tag = strtolower( preg_replace('/[^a-zA-Z_:]/', '', $tag_name) ); return apply_filters('tag_escape', $safe_tag, $tag_name); } diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 8db1f196b0..ae44aa2a2a 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -607,7 +607,7 @@ function wp_list_pages($args = '') { $current_page = 0; // sanitize, mostly to keep spaces out - $r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']); + $r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']); // Allow plugins to filter an array of excluded pages $r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude'])));