diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-12-12 10:05:26 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2006-12-12 10:05:26 +0000 |
commit | 5aba929c048eda6f066f7026549e6ad1519503fc (patch) | |
tree | 187681071beb8ff6d88876e54c9b9d25aa0345ba /modules/node/node.module | |
parent | bda8b0fdb525053171828d4b29494d9963aa2e04 (diff) | |
download | brdo-5aba929c048eda6f066f7026549e6ad1519503fc.tar.gz brdo-5aba929c048eda6f066f7026549e6ad1519503fc.tar.bz2 |
#49926: Allow break tag usage with PHP format, don't cut off otherwise.
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; |