diff options
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index a8cf6b2da..b683012b2 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -153,21 +153,21 @@ function node_teaser($body, $format = NULL) { return $body; } + // If a valid delimiter has been specified, use it to chop off the teaser. + if ($delimiter !== FALSE) { + return substr($body, 0, $delimiter); + } + // We check for the presence of the PHP evaluator filter in the current // format. If the body contains PHP code, we do not split it up to prevent // parse errors. if (isset($format)) { $filters = filter_list_format($format); - if (isset($filters['filter/1']) && (strpos($body, '<?') !== FALSE) && ($delimiter === FALSE || strpos($body, '<?') < $delimiter)) { + if (isset($filters['filter/1']) && strpos($body, '<?') !== FALSE) { return $body; } } - // If a valid delimiter has been specified, use it to chop of the teaser. - if ($delimiter !== FALSE) { - return substr($body, 0, $delimiter); - } - // If we have a short body, the entire body is the teaser. if (strlen($body) < $size) { return $body; |