summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module20
1 files changed, 15 insertions, 5 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 2d008daba..83a6ed06f 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -665,8 +665,22 @@ function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) {
* Apply filters and build the node's standard elements.
*/
function node_prepare($node, $teaser = FALSE) {
+ // First we'll overwrite the existing node teaser and body with
+ // the filtered copies! Then, we'll stick those into the content
+ // array and set the read more flag if appropriate.
+ if (strlen($node->teaser) < strlen($node->body)) {
+ $node->readmore = TRUE;
+ }
+
+ if ($teaser == FALSE) {
+ $node->body = check_markup($node->body, $node->format, FALSE);
+ }
+ else {
+ $node->teaser = check_markup($node->teaser, $node->format, FALSE);
+ }
+
$node->content['body'] = array(
- '#value' => check_markup($teaser ? $node->teaser : $node->body, $node->format, FALSE),
+ '#value' => $teaser ? $node->teaser : $node->body,
'#weight' => 0,
);
@@ -677,10 +691,6 @@ function node_prepare($node, $teaser = FALSE) {
);
}
- if (strlen($node->teaser) < strlen($node->body)) {
- $node->readmore = TRUE;
- }
-
return $node;
}