diff --git a/modules/book.module b/modules/book.module index c1018b30f930e0e745fcf45772495a24c860d651..e428eedae4b6b7279495c8e984c979f15e11dee2 100644 --- a/modules/book.module +++ b/modules/book.module @@ -620,6 +620,9 @@ function book_print($nid = 0, $depth = 1) { if (node_hook($node, 'content')) { $node = node_invoke($node, 'content'); } + // Allow modules to change $node->body before viewing. + node_invoke_nodeapi($node, 'view', $node->body, false); + $output .= '<h1 id="'. $node->nid .'" name="'. $node->nid .'" class="book-h'. $depth .'">'. $node->title .'</h1>'; if ($node->body) { @@ -655,6 +658,9 @@ function book_print_recurse($parent = '', $depth = 1) { if (node_hook($node, 'content')) { $node = node_invoke($node, 'content'); } + // Allow modules to change $node->body before viewing. + node_invoke_nodeapi($node, 'view', $node->body, false); + $output .= '<h1 id="'. $node->nid .'" name="'. $node->nid .'" class="book-h'. $depth .'">'. $node->title .'</h1>'; if ($node->body) { diff --git a/modules/book/book.module b/modules/book/book.module index c1018b30f930e0e745fcf45772495a24c860d651..e428eedae4b6b7279495c8e984c979f15e11dee2 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -620,6 +620,9 @@ function book_print($nid = 0, $depth = 1) { if (node_hook($node, 'content')) { $node = node_invoke($node, 'content'); } + // Allow modules to change $node->body before viewing. + node_invoke_nodeapi($node, 'view', $node->body, false); + $output .= '<h1 id="'. $node->nid .'" name="'. $node->nid .'" class="book-h'. $depth .'">'. $node->title .'</h1>'; if ($node->body) { @@ -655,6 +658,9 @@ function book_print_recurse($parent = '', $depth = 1) { if (node_hook($node, 'content')) { $node = node_invoke($node, 'content'); } + // Allow modules to change $node->body before viewing. + node_invoke_nodeapi($node, 'view', $node->body, false); + $output .= '<h1 id="'. $node->nid .'" name="'. $node->nid .'" class="book-h'. $depth .'">'. $node->title .'</h1>'; if ($node->body) {