at end of filter.module function _filter_autop($text) must be updated:
function _filter_autop($text) {
$text = preg_replace('|\n*$|', '', $text) ."\n\n"; // just to make things a little easier, pad the end
$text = preg_replace('|
\s*
|', "\n\n", $text);
$text = preg_replace('!(<(?:table|ul|ol|li|pre|form|blockquote|h[1-6])[^>]*>)!', "\n$1", $text); // Space things out a little
$text = preg_replace('!()!', "$1\n", $text); // Space things out a little
$text = preg_replace("/\n\n+/", "\n\n", $text); // take care of duplicates
$text = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "
$1
\n", $text); // make paragraphs, including one at the end
$text = preg_replace('|
\s*?
|', '', $text); // under certain strange conditions it could create a P of entirely whitespace
$text = preg_replace("|
(
|", "$1", $text); // problem with nested lists
$text = preg_replace('|
]*)>|i', "
", $text);
$text = str_replace('
', '
', $text);
$text = preg_replace('!
\s*(]*>)!', "$1", $text);
$text = preg_replace('!(]*>)\s*
!', "$1", $text);
$text = preg_replace('|(?)\s*\n|', "