diff --git a/guestbook.install b/guestbook.install
index fce2893..415b157 100755
--- a/guestbook.install
+++ b/guestbook.install
@@ -16,6 +16,8 @@ function guestbook_schema() {
       'commentauthor' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
       'comment' => array('type' => 'text', 'not null' => TRUE),
       'created' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
+      'message_format' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE, 'description' => 'The {filter_format}.format of the message.'),
+      'comment_format' => array('type' => 'varchar', 'length' => 255, 'not null' => FALSE, 'description' => 'The {filter_format}.format of the comment.'),
     ),
     'indexes' => array(
       'recipient' => array('recipient'),
@@ -72,5 +74,26 @@ function guestbook_update_6201() {
 }
 
 /**
- * @todo Update for new text formats. Global default is unsupported.
+ * Add {guestbook}.message_format and {guestbook}.comment_format column.
  */
+function guestbook_update_7000() {
+  $format_id = (string) variable_get('guestbook_input_format', 1);
+  db_add_field('guestbook', 'message_format', array(
+    'type' => 'varchar',
+    'length' => 255,
+    'not null' => FALSE,
+    'initial' => $format_id,
+    'description' => 'The {filter_format}.format of the message.',
+  ));
+  db_add_field('guestbook', 'comment_format', array(
+    'type' => 'varchar',
+    'length' => 255,
+    'not null' => FALSE,
+    'description' => 'The {filter_format}.format of the comment.',
+  ));
+  db_update('guestbook')
+    ->fields(array('comment_format' => $format_id))
+    ->condition('comment', '', '<>')
+    ->execute();
+  variable_del('guestbook_input_format');
+}
diff --git a/guestbook.module b/guestbook.module
index 07e8f82..d246309 100644
--- a/guestbook.module
+++ b/guestbook.module
@@ -531,6 +531,7 @@ function guestbook_form_entry_form($form, $form_state, $uid, $display = '', $ent
     '#rows' => GUESTBOOK_TEXTAREA_ROWS,
     '#required' => TRUE,
     '#default_value' => !empty($entry['message']) ? $entry['message'] : '',
+    '#format' => isset($entry['message_format']) ? $entry['message_format'] : NULL,
   );
   $form['actions'] = array('#type' => 'actions');
   $form['actions']['submit'] = array(
@@ -630,6 +631,7 @@ function guestbook_form_entry_form_submit($form, &$form_state) {
       'message' => $message,
       'comment' => '',
       'created' => REQUEST_TIME,
+      'message_format' => $form_state['values']['message']['format'],
     );
   }
   else {
@@ -640,6 +642,7 @@ function guestbook_form_entry_form_submit($form, &$form_state) {
       'message' => $message,
       'comment' => '',
       'created' => REQUEST_TIME,
+      'message_format' => $form_state['values']['message']['format'],
     );
   }
   $entryid = db_insert('guestbook')
@@ -668,6 +671,7 @@ function guestbook_form_entry_form_edit_submit($form, &$form_state) {
           'anonemail' => $form_state['values']['anonemail'],
           'anonwebsite' => $form_state['values']['anonwebsite'],
           'message' => $form_state['values']['message']['value'],
+          'message_format' => $form_state['values']['message']['format'],
         ))
         ->condition('id', $form_state['values']['entry_id'])
         ->execute();
@@ -677,6 +681,7 @@ function guestbook_form_entry_form_edit_submit($form, &$form_state) {
       db_update('guestbook')
         ->fields(array(
           'message' => $form_state['values']['message']['value'],
+          'message_format' => $form_state['values']['message']['format'],
         ))
         ->condition('id', $form_state['values']['entry_id'])
         ->execute();
@@ -788,6 +793,7 @@ function guestbook_form_comment_form($form, $form_state, $uid, $entry) {
   $form['comment'] = array(
     '#type' => 'text_format',
     '#default_value' => $entry['comment'],
+    '#format' => $entry['comment_format'],
   );
   $form['actions'] = array('#type' => 'actions');
   $form['actions']['submit'] = array(
@@ -807,6 +813,7 @@ function guestbook_form_comment_form_submit($form, &$form_state) {
       ->fields(array(
         'comment' => $form_state['values']['comment']['value'],
         'commentauthor' => $user->uid,
+        'comment_format' => $form_state['values']['comment']['format'],
       ))
       ->condition('id', $form_state['values']['entry_id'])
       ->execute();
@@ -950,7 +957,7 @@ function theme_guestbook_entry($variables) {
   $output .= '</div>';
 
   // Message.
-  $output .= '<div class="guestbook-message">'. check_markup($entry['message'], NULL, '', TRUE) .'</div>';
+  $output .= '<div class="guestbook-message">'. check_markup($entry['message'], $entry['message_format'], '', TRUE) .'</div>';
 
   // Guestbook owner comment.
   $output .= theme('guestbook_entry_comment', array('uid' => $uid, 'entry' => $entry, 'comment_entry' => $comment_entry));
@@ -1004,7 +1011,7 @@ function theme_guestbook_entry_comment($variables) {
     $output .= t('Comment by') .' '. $author;
     $output .= '</div>';
     $output .= '<div class="guestbook-comment-content">';
-    $output .= check_markup($entry['comment'], NULL, '', TRUE);
+    $output .= check_markup($entry['comment'], $entry['comment_format'], '', TRUE);
     $output .= '</div>';
   }
   return (!empty($output) ? '<div class="guestbook-comment">'. $output .'</div>' : '');
