Permalink
Browse files

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
  • Loading branch information...
1 parent 3458ed9 commit 5be8ce4fd4ea674377dc63a70df8cf28b9879587 ryan committed Jan 29, 2009
Showing with 3 additions and 3 deletions.
  1. +1 −1 wp-includes/class-phpmailer.php
  2. +1 −1 wp-includes/formatting.php
  3. +1 −1 wp-includes/post-template.php
@@ -1409,7 +1409,7 @@ function EncodeQP( $input = '', $line_max = 76, $space_conv = false ) {
*/
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':
@@ -1930,7 +1930,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);
}
@@ -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'])));

0 comments on commit 5be8ce4

Please sign in to comment.