--- query.php.ori	2008-12-09 17:03:32.000000000 +0100
+++ query.php	2009-05-22 23:57:57.343750000 +0200
@@ -2666,16 +2666,20 @@
 		$more = 1;
 	$content = $post->post_content;
 	if ( strpos( $content, '<!--nextpage-->' ) ) {
-		if ( $page > 1 )
-			$more = 1;
-		$multipage = 1;
 		$content = str_replace("\n<!--nextpage-->\n", '<!--nextpage-->', $content);
 		$content = str_replace("\n<!--nextpage-->", '<!--nextpage-->', $content);
 		$content = str_replace("<!--nextpage-->\n", '<!--nextpage-->', $content);
 		$pages = explode('<!--nextpage-->', $content);
-		$numpages = count($pages);
 	} else {
 		$pages[0] = $post->post_content;
+	}
+	$pages = apply_filters('content_paginate', $pages);
+	$numpages = count($pages);
+	if ( $numpages > 1 ) {
+		if ( $page > 1 )
+			$more = 1;
+		$multipage = 1;
+	} else {
 		$multipage = 0;
 	}
 	return true;
