Index: modules/reptag/reptag_process.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/reptag/reptag_process.inc,v
retrieving revision 1.15
diff -u -r1.15 reptag_process.inc
--- modules/reptag/reptag_process.inc	17 May 2006 14:51:26 -0000	1.15
+++ modules/reptag/reptag_process.inc	20 May 2006 23:02:52 -0000
@@ -3,13 +3,31 @@
 
 require_once (drupal_get_path('module', 'reptag').'/regtag_helper.inc');
 
-function reptag_process(&$node, $teaser) {
+define('REPTAG_NODEFULL',   0);
+define('REPTAG_NODETEASER', 1);
+define('REPTAG_COMMENT',    2);
+define('REPTAG_USERTEXT',   3);
+
+function reptag_process(&$node, $type) {
 
   global $user;
   
-  //disable reptags for certain node types 
-  if (variable_get('reptag_type_disable_'.$node->type, 0)) {
-    return;
+  //select body or teaser to filter
+  switch ($type) {
+    case REPTAG_NODEFULL:
+      $text = &$node->body;
+      break;
+    case REPTAG_NODETEASER:
+      $text = &$node->teaser;
+      break;
+    case REPTAG_COMMENT:
+      $text = &$node->comment;
+      break;
+    case REPTAG_USERTEXT:
+      $text = &$node->text;
+      break;
+    default:
+      return;
   }
   
   //include .tags modules
@@ -92,13 +110,6 @@
     drupal_set_message('node: '.nl2br(htmlspecialchars(print_r($node, true))), 'error');
   }
   
-  //select body or teaser to filter
-  if ($teaser) {
-    $text = &$node->teaser;
-  } else {
-    $text = &$node->body;
-  }
-  
   //process table tags
   $text = preg_replace(array_keys($reptag_table), array_values($reptag_table), $text);
   
@@ -167,7 +178,7 @@
       $xmlhtml = $pretag.implode('', $matches).$posttag;
       
       $dom = new DOMDocument;
-      $status = ini_set('html_errors', false);
+      $status = ini_set('html_errors', FALSE);
       $dom->loadHTML($xmlhtml);
       if (!$dom->validate()) {
         ini_set('html_errors', $status);
Index: modules/reptag/reptag.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/reptag/reptag.module,v
retrieving revision 1.22
diff -u -r1.22 reptag.module
--- modules/reptag/reptag.module	17 May 2006 14:51:26 -0000	1.22
+++ modules/reptag/reptag.module	20 May 2006 22:56:18 -0000
@@ -140,19 +140,30 @@
  * (instead of hook_filter since we need access to $node) 
  */
 function reptag_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
-  if (variable_get('reptag_enable', 0) && ($op == 'view')) {
+  if (variable_get('reptag_enable', 0) && ($op == 'view')
+      && !variable_get('reptag_type_disable_'.$node->type, 0)) {
     if ($node->in_preview) {
        if (variable_get('reptag_preview', 1)) {
-          reptag_process($node, TRUE);
-          reptag_process($node, FALSE);
+          reptag_process($node, REPTAG_NODETEASER);
+          reptag_process($node, REPTAG_NODEFULL);
        }
     } else {
-      reptag_process($node, $teaser);
+      reptag_process($node, ($teaser ? REPTAG_NODETEASER : REPTAG_NODEFULL));
     }
   } 
 }
 
 /**
+ * Implementation of hook_comment().
+ * (run reptag_process on comments) 
+ */
+function reptag_comment(&$comment, $op) {
+  if ($op == 'view' && !variable_get('reptag_type_disable_comments', 1)) {
+    reptag_process($comment, REPTAG_COMMENT);
+  }
+}
+
+/**
  * Implementation of reptag_manage_admin().
  *  - general settings - 
  */
@@ -209,6 +220,14 @@
         '#default_value' => variable_get('reptag_type_disable_'.$type, 0)
       );
     }
+    if (module_exist('comment')) {
+      $form['global']['node_types']['comments'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Disable RepTags for ').'<strong>'.strtoupper(t('comments')).'</strong>',
+        '#return_value' => 1,
+        '#default_value' => variable_get('reptag_type_disable_comments', 1)
+      );
+    }
   }
   
   //expert - settings
