Add missing preg delimiters. Props ridgerunner. fixes #8986 for 2.7

git-svn-id: http://svn.automattic.com/wordpress/branches/2.7@10460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-01-29 17:46:48 +00:00
parent 3458ed9d37
commit 5be8ce4fd4
3 changed files with 3 additions and 3 deletions

View File

@ -1409,7 +1409,7 @@ class PHPMailer {
*/ */
function EncodeQ ($str, $position = 'text') { function EncodeQ ($str, $position = 'text') {
/* There should not be any EOL in the string */ /* There should not be any EOL in the string */
$encoded = preg_replace("[\r\n]", '', $str); $encoded = preg_replace("/[\r\n]/", '', $str);
switch (strtolower($position)) { switch (strtolower($position)) {
case 'phrase': case 'phrase':

View File

@ -1930,7 +1930,7 @@ function attribute_escape( $text ) {
* @return string * @return string
*/ */
function tag_escape($tag_name) { 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); return apply_filters('tag_escape', $safe_tag, $tag_name);
} }

View File

@ -607,7 +607,7 @@ function wp_list_pages($args = '') {
$current_page = 0; $current_page = 0;
// sanitize, mostly to keep spaces out // 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 // Allow plugins to filter an array of excluded pages
$r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude']))); $r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude'])));