Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.701 diff -u -F^f -r1.701 node.module --- modules/node/node.module 16 Sep 2006 05:35:57 -0000 1.701 +++ modules/node/node.module 3 Oct 2006 01:30:46 -0000 @@ -151,8 +151,10 @@ function node_teaser($body, $format = NU $size = variable_get('teaser_length', 600); - // find where the delimiter is in the body - $delimiter = strpos($body, ''); + // Find where the delimiter is in the body + $p1 = strpos($body, ''); + $p2 = strpos($body, ''); + $delimiter = ($p1 !== FALSE) ? $p1 : $p2; // If the size is zero, and there is no delimiter, the entire body is the teaser. if ($size == 0 && $delimiter === FALSE) { @@ -700,8 +702,7 @@ function node_prepare($node, $teaser = F */ function node_build_content($node, $teaser = FALSE, $page = FALSE) { // Remove the delimiter (if any) that separates the teaser from the body. - // TODO: this strips legitimate uses of '' also. - $node->body = str_replace('', '', $node->body); + $node->body = str_replace(array('', ''), array('', ''), $node->body); // The 'view' hook can be implemented to overwrite the default function // to display nodes. @@ -2095,7 +2096,7 @@ function node_preview($node) { function theme_node_preview($node) { $output = '
'; if ($node->teaser && $node->teaser != $node->body) { - drupal_set_message(t('The trimmed version of your post shows what your post looks like when promoted to the main page or when exported for syndication. You can insert the delimiter "<!--break-->" (without the quotes) to fine-tune where your post gets split.')); + drupal_set_message(t('The trimmed version of your post shows what your post looks like when promoted to the main page or when exported for syndication. You can insert the delimiter "<break>" (without the quotes) to fine-tune where your post gets split.')); $output .= '

'. t('Preview trimmed version') .'

'; $output .= node_view(drupal_clone($node), 1, FALSE, 0); $output .= '

'. t('Preview full version') .'

';