? 2
? 375064-node-language-1.patch
? 693084-74.patch
? 744384-session-unchanged.patch
? 7881-d7a4_1.patch
? arg-pages-1.patch
? basename-1.patch
? comment-permissions-1.patch
? drupal.breadcrumbs.256.patch
? drupal.simpletest-failed-methods.0.patch
? file_exists-4.patch
? filter-autop-2.patch
? filter-autop-3.patch
? from-system-to-common-2.patch
? function will be called byq
? i2.php
? index.html
? locale-race-condition-2.patch
? menu-tree-page-data-3.patch
? menu-tree-page-data-3.patch.1
? openid-delegate-1.patch
? openid-js-3.patch
? openid-link-1.patch
? openid-parse-html-2.patch
? page-cache-maximum-age-1.patch
? revert-1.29-1.patch.1
? sess.txt
? sess2.txt
? session,
? session-write-13.patch
? session-write-13.patch.1
? system_rebuild_module_data-5.patch
? taxonomy-upgrade-706842-97.patch
? token-sanitize-1.patch
? token-sanitize-2.patch
? token-sanitize-x.patch
? user-login-5.patch
? x
? x.php
? profiles/hverdagspriser
? sites/hverdagspriser.drupal7.dev.chsc.dk
? sites/all/modules/logout_bug
? sites/default/files
? sites/default/modules
? sites/default/private
? sites/default/settings.php
Index: modules/filter/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.355
diff -u -9 -p -r1.355 filter.module
--- modules/filter/filter.module	22 Oct 2010 16:36:14 -0000	1.355
+++ modules/filter/filter.module	25 Oct 2010 21:22:14 -0000
@@ -1617,35 +1617,35 @@ function _filter_autop($text) {
         }
       }
       // Only allow a matching tag to close it.
       elseif ((!$open && $ignoretag == $tag) || $comment) {
         $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('|<br />\s*<br />|', "\n\n", $chunk);
-      $chunk = preg_replace('!(<' . $block . '[^>]*>)!', "\n$1", $chunk); // Space things out a little
-      $chunk = preg_replace('!(</' . $block . '>)!', "$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\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 = preg_replace("|<p>(<li.+?)</p>|", "$1", $chunk); // problem with nested lists
-      $chunk = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $chunk);
+      $chunk = preg_replace('`\n*$`', '', $chunk) . "\n\n"; // just to make things a little easier, pad the end
+      $chunk = preg_replace('`<br ?/?>\s*<br ?/?>`i', "\n\n", $chunk);
+      $chunk = preg_replace('`(<' . $block . '[^>]*>)`i', "\n$1", $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\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 = preg_replace('`<p>(<li.+?)</p>`i', '$1', $chunk); // problem with nested lists
+      $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*(</?' . $block . '[^>]*>)!', "$1", $chunk);
-      $chunk = preg_replace('!(</?' . $block . '[^>]*>)\s*</p>!', "$1", $chunk);
-      $chunk = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $chunk); // make line breaks
-      $chunk = preg_replace('!(</?' . $block . '[^>]*>)\s*<br />!', "$1", $chunk);
-      $chunk = preg_replace('!<br />(\s*</?(?:p|li|div|th|pre|td|ul|ol)>)!', '$1', $chunk);
-      $chunk = preg_replace('/&([^#])(?![A-Za-z0-9]{1,8};)/', '&amp;$1', $chunk);
+      $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 . '[^>]*>)`i', '$1', $chunk);
+      $chunk = preg_replace('`(</?' . $block . '[^>]*>)\s*</p>`i', '$1', $chunk);
+      $chunk = preg_replace('`(?<!<br />|<br/>|<br>)\s*\n`i', "<br />\n", $chunk); // make line breaks
+      $chunk = preg_replace('`(</?' . $block . '[^>]*>)\s*<br ?/?>`i', '$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);
     }
     $output .= $chunk;
   }
   return $output;
 }
 
 /**
  * Filter tips callback for auto-paragraph filter.
  */
Index: modules/filter/filter.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter/filter.test,v
retrieving revision 1.80
diff -u -9 -p -r1.80 filter.test
--- modules/filter/filter.test	23 Oct 2010 02:26:11 -0000	1.80
+++ modules/filter/filter.test	25 Oct 2010 21:22:14 -0000
@@ -846,18 +846,24 @@ class FilterUnitTestCase extends DrupalU
       '<div><p>  </p></div>' => array(
         "<div>\n</div>" => TRUE,
       ),
       '<blockquote><pre>aaa</pre></blockquote>' => array(
         "<blockquote><pre>aaa</pre></blockquote>" => TRUE,
       ),
     );
     $this->assertFilteredString($filter, $tests);
 
+    $f = _filter_autop('<P>foo</P>');
+    $this->assertEqual(trim($f), '<P>foo</P>', t('Make sure line breaking supports upper-case tag names.').$f);
+
+    $f = _filter_autop('<TABLE><TR><TD>foo</TD><TD>aaa<BR>\nbbb</TD></TR></TABLE>');
+    $this->assertEqual(preg_replace('/\s/', '', $f), preg_replace('/\s/', '', $f), t('Make sure line breaking supports upper-case tag names.'));
+
     // Very long string hitting PCRE limits.
     $limit = max(ini_get('pcre.backtrack_limit'), ini_get('pcre.recursion_limit'));
     $source = $this->randomName($limit);
     $result = _filter_autop($source);
     $success = $this->assertEqual($result, '<p>' . $source . "</p>\n", t('Line break filter can process very long strings.'));
     if (!$success) {
       $this->verbose("\n" . $source . "\n<hr />\n" . $result);
     }
   }
