From 2b5dfdafa51f92e074d96ca249039f59b5bdc1a6 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 2 Jan 2003 18:34:13 +0000 Subject: Bugfix: when we have to extract a comment's title from the comment's body, first strip the body's HTML tags or we might get an empty title after all. --- modules/comment/comment.module | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index d27f36d7d..b4f1971ec 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -200,7 +200,11 @@ function comment_post($edit) { ** one from the comment's body. */ - $edit["subject"] = strip_tags(($edit["subject"] ? $edit["subject"] : substr($edit["comment"], 0, 29))); + $edit["subject"] = strip_tags($edit["subject"]); + + if ($edit["subject"] == "") { + $edit["subject"] = substr(strip_tags($edit["comment"]), 0, 29); + } /* ** Validate the comment's body. -- cgit v1.2.3