Commit 2b5dfdaf authored by Dries's avatar Dries

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.
parent a728900d
......@@ -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.
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment