Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.362
diff -u -p -r1.362 filter.module
--- modules/filter/filter.module	14 Jan 2011 08:33:46 -0000	1.362
+++ modules/filter/filter.module	11 Feb 2011 00:39:29 -0000
@@ -1590,11 +1590,12 @@ function _filter_autop($text) {
   // All block level tags
   $block = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|p|h[1-6]|hr)';
 
-  // Split at opening and closing PRE, SCRIPT, STYLE, OBJECT tags and comments.
-  // We don't apply any processing to the contents of these tags to avoid messing
-  // up code. We look for matched pairs and allow basic nesting. For example:
-  // "processed <pre> ignored <script> ignored </script> ignored </pre> processed"
-  $chunks = preg_split('@(<!--.*?-->|</?(?:pre|script|style|object|!--)[^>]*>)@i', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
+  // Split at opening and closing PRE, SCRIPT, STYLE, OBJECT, IFRAME tags and
+  // comments. We don't apply any processing to the contents of these tags to
+  // avoid messing up code. We look for matched pairs and allow basic nesting.
+  // For example: "processed <pre> ignored <script> ignored </script> ignored
+  // </pre> processed"
+  $chunks = preg_split('@(<!--.*?-->|</?(?:pre|script|style|object|iframe|!--)[^>]*>)@i', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
   // Note: PHP ensures the array consists of alternating delimiters and literals
   // and begins and ends with a literal (inserting NULL as required).
   $ignore = FALSE;
Index: modules/filter/filter.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.test,v
retrieving revision 1.84
diff -u -p -r1.84 filter.test
--- modules/filter/filter.test	4 Feb 2011 18:42:21 -0000	1.84
+++ modules/filter/filter.test	11 Feb 2011 00:39:30 -0000
@@ -833,6 +833,10 @@ class FilterUnitTestCase extends DrupalU
       '<blockquote><pre>aaa</pre></blockquote>' => array(
         "<blockquote><pre>aaa</pre></blockquote>" => TRUE,
       ),
+      // Bug 810824, paragraphs were appearing around iframe tags.
+      "<iframe>aaa</iframe>\n\n" => array(
+        "<p><iframe>aaa</iframe></p>" => FALSE,
+      ),
     );
     $this->assertFilteredString($filter, $tests);
 
