diff --git a/modules/book.module b/modules/book.module
index bee2643f09d0daf7f5a2a758c9fcb1456c780c89..6900e52ca2b3ca2e8dc5d901334abe81644531db 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -480,11 +480,12 @@ function book_tree_recurse($nid, $depth, $children) {
   if ($depth > 0) {
     if ($children[$nid]) {
       foreach ($children[$nid] as $foo => $node) {
-        $output .= "<li>". l($node->title, "node/view/$node->nid") ."</li>";
-
+        $output .= "<li>";
+        $output .= l($node->title, "node/view/$node->nid");
         if ($tree = book_tree_recurse($node->nid, $depth - 1, $children)) {
           $output .= "<ul>$tree</ul>";
         }
+        $output .= "</li>";
       }
     }
   }
@@ -756,4 +757,4 @@ function book_help() {
 </ul>
   <?php
 }
-?>
\ No newline at end of file
+?>
diff --git a/modules/book/book.module b/modules/book/book.module
index bee2643f09d0daf7f5a2a758c9fcb1456c780c89..6900e52ca2b3ca2e8dc5d901334abe81644531db 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -480,11 +480,12 @@ function book_tree_recurse($nid, $depth, $children) {
   if ($depth > 0) {
     if ($children[$nid]) {
       foreach ($children[$nid] as $foo => $node) {
-        $output .= "<li>". l($node->title, "node/view/$node->nid") ."</li>";
-
+        $output .= "<li>";
+        $output .= l($node->title, "node/view/$node->nid");
         if ($tree = book_tree_recurse($node->nid, $depth - 1, $children)) {
           $output .= "<ul>$tree</ul>";
         }
+        $output .= "</li>";
       }
     }
   }
@@ -756,4 +757,4 @@ function book_help() {
 </ul>
   <?php
 }
-?>
\ No newline at end of file
+?>