diff --git a/modules/comment.module b/modules/comment.module
index f18054efd3efca7091f3aa5b568c1ee8c633534d..0bf0245011e16b816b103cfb9a4f4f79542001a7 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -115,7 +115,7 @@ function comment_post($edit) {
     }
     else {
       // validate subject:
-      $edit[subject] = $edit[subject] ? $edit[subject] : substr($edit[comment], 0, 29);
+      $edit[subject] = strip_tags(($edit[subject] ? $edit[subject] : substr($edit[comment], 0, 29)));
 
       // add watchdog entry:
       watchdog("special", "comment: added '$edit[subject]'");
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index f18054efd3efca7091f3aa5b568c1ee8c633534d..0bf0245011e16b816b103cfb9a4f4f79542001a7 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -115,7 +115,7 @@ function comment_post($edit) {
     }
     else {
       // validate subject:
-      $edit[subject] = $edit[subject] ? $edit[subject] : substr($edit[comment], 0, 29);
+      $edit[subject] = strip_tags(($edit[subject] ? $edit[subject] : substr($edit[comment], 0, 29)));
 
       // add watchdog entry:
       watchdog("special", "comment: added '$edit[subject]'");