Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.328
diff -u -9 -p -r1.328 filter.module
--- modules/filter/filter.module	24 Apr 2010 14:53:59 -0000	1.328
+++ modules/filter/filter.module	29 Apr 2010 19:54:17 -0000
@@ -1438,35 +1438,35 @@ function _filter_autop($text) {
         }
       }
       // Only allow a matching tag to close it.
       elseif (!$open && $ignoretag == $tag) {
         $ignore = FALSE;
         $ignoretag = '';
       }
     }
     elseif (!$ignore) {
-      $chunk = preg_replace('|\n*$|', '', $chunk) . "\n\n"; // just to make things a little easier, pad the end
+      $chunk = preg_replace('`\n*$`', '', $chunk) . "\n\n"; // just to make things a little easier, pad the end
-      $chunk = preg_replace('|<br />\s*<br />|', "\n\n", $chunk);
+      $chunk = preg_replace('`<br />\s*<br />`i', "\n\n", $chunk);
-      $chunk = preg_replace('!(<' . $block . '[^>]*>)!', "\n$1", $chunk); // Space things out a little
+      $chunk = preg_replace('`(<' . $block . '[^>]*>)`i', "\n$1", $chunk); // Space things out a little
-      $chunk = preg_replace('!(</' . $block . '>)!', "$1\n\n", $chunk); // Space things out a little
+      $chunk = preg_replace('`(</' . $block . '>)`i', "$1\n\n", $chunk); // Space things out a little
-      $chunk = preg_replace("/\n\n+/", "\n\n", $chunk); // take care of duplicates
+      $chunk = preg_replace('`\n\n+`', "\n\n", $chunk); // take care of duplicates
-      $chunk = preg_replace('/^\n|\n\s*\n$/', '', $chunk);
+      $chunk = preg_replace('`^\n|\n\s*\n$`', '', $chunk);
-      $chunk = '<p>' . preg_replace('/\n\s*\n\n?(.)/', "</p>\n<p>$1", $chunk) . "</p>\n"; // make paragraphs, including one at the end
+      $chunk = '<p>' . preg_replace('`\n\s*\n\n?(.)`', "</p>\n<p>$1", $chunk) . "</p>\n"; // make paragraphs, including one at the end
-      $chunk = preg_replace("|<p>(<li.+?)</p>|", "$1", $chunk); // problem with nested lists
+      $chunk = preg_replace('`<p>(<li.+?)</p>`i', '$1', $chunk); // problem with nested lists
-      $chunk = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $chunk);
+      $chunk = preg_replace('`<p><blockquote([^>]*)>`i', '<blockquote$1><p>', $chunk);
       $chunk = str_replace('</blockquote></p>', '</p></blockquote>', $chunk);
-      $chunk = preg_replace('|<p>\s*</p>\n?|', '', $chunk); // under certain strange conditions it could create a P of entirely whitespace
+      $chunk = preg_replace('`<p>\s*</p>\n?`i', '', $chunk); // under certain strange conditions it could create a P of entirely whitespace
-      $chunk = preg_replace('!<p>\s*(</?' . $block . '[^>]*>)!', "$1", $chunk);
+      $chunk = preg_replace('`<p>\s*(</?' . $block . '[^>]*>)`i', '$1', $chunk);
-      $chunk = preg_replace('!(</?' . $block . '[^>]*>)\s*</p>!', "$1", $chunk);
+      $chunk = preg_replace('`(</?' . $block . '[^>]*>)\s*</p>`i', '$1', $chunk);
-      $chunk = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $chunk); // make line breaks
+      $chunk = preg_replace('`(?<!<br />)\s*\n`i', "<br />\n", $chunk); // make line breaks
-      $chunk = preg_replace('!(</?' . $block . '[^>]*>)\s*<br />!', "$1", $chunk);
+      $chunk = preg_replace('`(</?' . $block . '[^>]*>)\s*<br />`i', '$1', $chunk);
-      $chunk = preg_replace('!<br />(\s*</?(?:p|li|div|th|pre|td|ul|ol)>)!', '$1', $chunk);
+      $chunk = preg_replace('`<br />(\s*</?(?:p|li|div|th|pre|td|ul|ol)>)`i', '$1', $chunk);
-      $chunk = preg_replace('/&([^#])(?![A-Za-z0-9]{1,8};)/', '&amp;$1', $chunk);
+      $chunk = preg_replace('`&([^#])(?![A-Za-z0-9]{1,8};)`', '&amp;$1', $chunk);
     }
     $output .= $chunk;
   }
   return $output;
 }
 
 /**
  * Filter tips callback for auto-paragraph filter.
  */
