Index: comment_notify.module
===================================================================
RCS file: /var/lib/cvs/drupal-common/modules/contrib/comment_notify/comment_notify.module,v
retrieving revision 1.1.6.1
diff -u -8 -p -r1.1.6.1 comment_notify.module
--- comment_notify.module	26 Jan 2009 11:39:16 -0000	1.1.6.1
+++ comment_notify.module	26 Jan 2009 14:10:14 -0000
@@ -418,27 +418,36 @@ function _comment_notify_mailalert($comm
           '!login_uri' => url('user', array('absolute' => TRUE)),
           '!edit_uri' => url('user/'. $alert->uid .'/edit', array('absolute' => TRUE)),
           '!link1' => url('comment_notify/disable/'. $alert->notify_hash, array('absolute' => TRUE))
         )
       );
       drupal_mail('comment_notify', 'comment_notify_mail', $mail, $language, $message);
       $sent_to[] = $mail;
 
+      // Make the mail link to user's /edit, unless it's an anonymous user.
       if ($alert->uid != 0) {
-        $watchdog_message = 'Notified: <a href="!url">@user_mail</a>';
+        $user_mail = l($mail, 'user/'. $alert->uid .'/edit');
       }
       else {
-        $watchdog_message = 'Notified @user_mail';
+        $user_mail = check_plain($mail);
       }
 
-      watchdog('comment_notify', $watchdog_message, array('!url' => url('user/'. $alert->uid .'/edit'), '@user_mail' => $mail),
-        WATCHDOG_NOTICE, l(t('source comment'), 'node/'. $nid, array('fragment' => 'comment-'. $alert->cid)));
-
       // Add an entry to the watchdog log.
+      watchdog(
+        'comment_notify',
+        'Notified: !user_mail',
+        array(
+          '!user_mail' => $user_mail,
+        ),
+        WATCHDOG_NOTICE,
+        l(t('source comment'), 'node/'. $nid, array(
+          'fragment' => 'comment-'. $alert->cid,
+        ))
+      );
 
       // revert to previous (site default) locale
       $language = $initial_language;
     }
   }
 }
 
 function comment_notify_mail($key, &$message, $params) {
